-
Notifications
You must be signed in to change notification settings - Fork 3
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
#194 improve marker cleanup #195
Conversation
I have rebased the branch. Ready for review. (I have worked too much with gerrit lately - one PR=one commit, so it did not even occur to me, that I could have simply done the two fixes with two commits in one PR.) |
I am quite confident about this change and it is not a fundamentally new feature. However, I'd still appreciate your feedback before merging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, this does not seem to work for me. Steps to reproduce:
- Import project from issues-194.zip
- In
score2.ily
line 8, changex
toc
- The error marker does not disappear
Thanks for your feedback! This is indeed a "border-case" currently not covered. However, the cause is not the marker removal itself, but the calculation of included files. The calculation is based on the index information of resolved references. But an include alone does not yet create such a reference. Only if you refer to a definition from an included file, such a reference is created. You can see the difference if you add Should I try to fix this "academic" case for this PR or should it be a separate issue. |
It turns out, the problem is even more border-line. Even if you add any real reference (like Unfortunately it does not suffice to invoke the scope provider during validation - the linking and creation of the resource descriptions is already done at that point. Hopefully, I find a simple way to ensure the scope provider is at least invoked once... |
I see. If you find a simple fix, let's include also that one, otherwise I'd propose to track the scope calculation as a separate issue, rename #194 and I'll approve this PR. |
I had to do another bigger refactoring. The initial change was too simplistic. Removing the markers from all included files when saving one changed file is wrong: if you have several included files, each with a lilypond compile error, markers should be removed only from the changed file. Otherwise too much information is lost. The PR now contains the following improvements:
|
If you are currently working on Elysium, could you have another look at the changes? |
Sorry for the delay. I'm updating my development environment and going to review this in one week if everything goes well. |
Unfortunately I stumbled into #197. I ask for your patience again, this might take one more week. |
I'd like to try this out. Please rebase this branch to current master and provide manual test instructions to verify whether this works correctly. Thank you in advance! |
If a file contains an include but no (Xtext) reference, the includes have not been calculated by the scope provider. In this case invoke the calculation when creating the Resourcedescriptions.
85bedba
to
f055d29
Compare
OK to summarize: Compilation is executed only on the main ly-File. If the compiler finds problems in an included file, markers are created there.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I have just nitpicks.
org.elysium.parent/org.elysium.ui/src/org/elysium/ui/compiler/CompilerJob.java
Outdated
Show resolved
Hide resolved
org.elysium.parent/org.elysium.ui/src/org/elysium/ui/compiler/LilyPondBuilder.java
Outdated
Show resolved
Hide resolved
Remove markers in included files as well, not only in the main file to be compiled and update file decorations. If lilypond compilation is not active, the user should not be asked whether to continue with the compilation - it does not matter if there are open dirty files.
f055d29
to
f670a80
Compare
I have updated the PR accordingly |
Remove markers in included files as well, not only in the main file to
be compiled.
If you merge PR #192 first, I'd rebase this commit.