-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Enable Unity Build for Engraving module #8765
Conversation
Ah, the Windows build is failing. Again because of the same problem that Ashwath is having in his GSoC PR: in some Windows header, there is a It might be better anyway to rename |
IMHO the real solution is indeed to change Here we could get away with an It is not a plain Windows issue though, but rather an MSVC one, as MinGW does not have that issue. Best if we could get rid of that And that header guard is need in any case, it is the RightThing(tm), not just for Unity builds ;.) I do get a warning with your PR (and the 'fix' for the compile error, see above):
Excluding those 2 from Unity build results in compiler errors:
So renaming at least one of those is due. With that it finally builds. Complete (re)build in 1 minute on my machine ;-) |
That's an option too (and cleaner!), but won't solve the warning I mentioned above (which does sound quite dangerous), and, once fixed, the naming conflicts I also mentioned |
I didn't like just putting So I decided not to pollute the code with I did not encounter a warning or error about chordlist.cpp however, and can't seem to find anything about it in the CI build logs either. On my two-core (!) Windows laptop, a full build (including unit tests) takes still almost 10 minutes (I don't know how long it takes without unity). But it's great to hear that it gives good results for you; that's in fact a 14% reduction. |
OK, let's see what it does on my machine (12 cores + HT) once merged. If I then still see that warning about the 2 chordlist.cpp files, I know what to do ;-) |
Oh, and I don't do the unit tests (haven't figured out how to, so I let GitHub CI do it for me ;-) |
True, I'll fix that. |
By the way, while looking at the CI log, I saw that there was a mistake in build_ninja.sh, so I fixed that too. |
f222084
to
d59b3cf
Compare
as needed for MSVC, which uses them in some headers Partial backport of musescore#8765
src/plugins/api/elements.h
Outdated
@@ -168,7 +168,7 @@ class Element : public Ms::PluginAPI::ScoreElement | |||
API_PROPERTY_T(bool, visible, VISIBLE) | |||
/** Stacking order of this element */ | |||
API_PROPERTY_T(int, z, Z) | |||
API_PROPERTY(small, SMALL) | |||
API_PROPERTY(isSmall, SMALL) |
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.
This seems not needed and might break plugins using small
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.
It does cause an mtest failure (in 3.x):
52/62 Test #53: tst_scripting ....................***Failed 1.09 sec
This plugin does not support createPlatformOpenGLContext!
--- /home/runner/work/MuseScore/MuseScore/mtest/scripting/p1.log.ref 2021-08-03 11:40:32.524648773 +0000
+++ p1.log 2021-08-03 12:05:47.534379914 +0000
@@ -4,13 +4,13 @@
found:TimeSig (24) at 0
found:Chord (93) at 0
beamMode:0
- small:false
+ small:
stemDirection:AUTO
duration:1/4
found:Rest (25) at 480
found:Chord (93) at 960
beamMode:0
- small:false
+ small:
stemDirection:AUTO
duration:1/2
found:BarLine (12) at 1920
<diff -u /home/runner/work/MuseScore/MuseScore/mtest/scripting/p1.log.ref p1.log failed
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.
Okay, I'll undo this change! (and other plugin API related ones, if any)
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
It seems, windows.h was in one place |
Maybe, but I don't think this relates to this PR here. It is in main.cpp too (and a few other places, like filesystem.cpp) |
unit build does not combine all project files, but only files of one target (module) |
Still, as long as the conflicting (It is defintly needed in fliesystem.cpp and certainly in main.cpp too) |
Another solution, we can put
|
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
another part of musescore#8765, not sure whether it breaks existing plugins?
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
another part of musescore#8765, not sure whether it breaks existing plugins?
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
another part of musescore#8765, not sure whether it breaks existing plugins?
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
Rebase needed too (meanwhile) |
I'm working on it (but I'm having some technical trouble at the moment...) |
d59b3cf
to
7042d67
Compare
Also added some constexpr and updated a license header.
bc76e79
to
b4a4e41
Compare
As mentioned earlier this PR does result in an MSCV compiler warning, even after merge:
And fixing that by exluding those 2 from Unity build gives compiler errors reg. redefinition of Added fix for this to #8798 |
There's another compiler warning, from MinGW, unrelated to this PR, but related to another change from @cbjeukendrup 👍
No idea what to do about this? |
I wonder why I have never seen that chordlist warning. Which generator do you use, Ninja or Visual Studio? I use Ninja, so that might explain the difference. I'll try to fix the MinGW warning. |
VS not Ninja I wouldn't even know how to use Nija (in VS or QtCreator), nor what the benefit might be? |
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
as it was needed for MSVC, which uses these in some headers, so they conflict with MuseScore's functions, variables, marcos. Partial backport of musescore#8765
It appeared that a
#ifndef MU_..._H
guard was missing, and for the rest, only the read114.cpp and read206.cpp files were conflicting with each other, so I enabled the Unity Build for the whole module and excluded only those critical files.So, hopefully we get a little faster builds now :)