Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix lfc rebuild #524

Merged
merged 4 commits into from
Sep 21, 2021
Merged

fix lfc rebuild #524

merged 4 commits into from
Sep 21, 2021

Conversation

cmnrd
Copy link
Collaborator

@cmnrd cmnrd commented Sep 21, 2021

closes #521

@cmnrd cmnrd requested review from Soroosh129 and lhstrh September 21, 2021 13:34
Copy link
Contributor

@Soroosh129 Soroosh129 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While lfc -r does not throw an error anymore, the smart rebuilding mechanism does not seem to work on my machine.

For example, changing something in CGenerator.xtend does not cause lfc -r to rebuild:

lfc -r
lfc: info: Not rebuilding; already up-to-date.
lfc: fatal error: No input files.

Is this issue repeatable on your machine as well @cmnrd?

@lhstrh
Copy link
Member

lhstrh commented Sep 21, 2021

@Soroosh129: it works for me...

@lhstrh
Copy link
Member

lhstrh commented Sep 21, 2021

I also don't understand what's the problem. You say that the "smart rebuilding mechanism doesn't seem to work," but the output you shared shows that it does work (lfc: info: Not rebuilding; already up-to-date.).

Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@Soroosh129
Copy link
Contributor

I also don't understand what's the problem. You say that the "smart rebuilding mechanism doesn't seem to work," but the output you shared shows that it does work (lfc: info: Not rebuilding; already up-to-date.).

Hmm. As I said, if I change something in CGenerator.xtend, I'd expect to get a rebuild, but I instead get this message that says everything is already up to date. Here is my original comment:

For example, changing something in CGenerator.xtend does not cause lfc -r to rebuild:

@lhstrh
Copy link
Member

lhstrh commented Sep 21, 2021 via email

@lhstrh
Copy link
Member

lhstrh commented Sep 21, 2021

@soroush: I'm not able to reproduce this behavior. If the problem persists, please create an issue for it. I'm going ahead and will merge in this fix.

@lhstrh lhstrh merged commit cd5c1a4 into master Sep 21, 2021
@lhstrh lhstrh deleted the lfc-rebuild branch September 21, 2021 21:39
@soroush
Copy link

soroush commented Sep 21, 2021

@soroush: I'm not able to reproduce this behavior. If the problem persists, please create an issue for it. I'm going ahead and will merge in this fix.

You know, it would be really nice if you guys stop mentioning me; otherwise I would have to join the project and start fixing bugs (:

@lhstrh
Copy link
Member

lhstrh commented Sep 21, 2021

You're very welcome to come and join the project, @soroush! As you probably can tell by now, we could use some bug fixers :-D

I'm sorry this keeps happening; I wish GitHub threw a warning when mentioning folks that are unrelated to the project.

@Soroosh129
Copy link
Contributor

It's a nice handle you got there 👀

@cmnrd
Copy link
Collaborator Author

cmnrd commented Sep 22, 2021

I can reproduce @Soroosh129's behavior and I am actually surprised that it seems to work for @lhstrh. Currently, the rebuild logic only checks for changes in org.lf-lang.lfc but not in org.lf-lang. I will try to create a fix.

@lhstrh
Copy link
Member

lhstrh commented Sep 22, 2021 via email

@cmnrd
Copy link
Collaborator Author

cmnrd commented Sep 22, 2021

It’s because I changed something in org.lflang :-)

But that is where lfc currently doesn't check ;)

Anyway, I started to fix this issue in lfc, but mid-way I realized that the rebuild feature is very hacky and makes a few assumptions. This leads to things breaking down if the assumptions aren't true. This sis for instance the case when we run a pre-built lfc. We currently have ./gradlew runLfc --args which does the exact same thing as lfc -r, so I am thinking that we should just drop the feature and let gradle do the job for us. I also opened a discussion #528

@lhstrh
Copy link
Member

lhstrh commented Sep 22, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lfc -r no longer works
4 participants