Closed
Bug 1275297
Opened 8 years ago
Closed 8 years ago
Run Visual Studio backend automatically
Categories
(Firefox Build System :: General, defect)
Firefox Build System
General
Tracking
(firefox49 fixed)
RESOLVED
FIXED
mozilla49
Tracking | Status | |
---|---|---|
firefox49 | --- | fixed |
People
(Reporter: gps, Assigned: gps)
References
Details
Attachments
(4 files)
We only need to do a few things to enable the Visual Studio project files to be generated automatically. Let's do that.
Assignee | ||
Comment 1•8 years ago
|
||
Upon further examination, VS2013 and VS2015 share the same file format version. They also write the internal version number in a comment, not the user-facing production version. Review commit: https://reviewboard.mozilla.org/r/54874/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/54874/
Attachment #8755902 -
Flags: review?(cmanchester)
Attachment #8755903 -
Flags: review?(cmanchester)
Attachment #8755904 -
Flags: review?(cmanchester)
Attachment #8755905 -
Flags: review?(mh+mozilla)
Assignee | ||
Comment 2•8 years ago
|
||
Visual Studio will write this variable to an ancient Visual Studio version (2010 I believe) if we don't specify it. Explicitly write the variable to the minimum Visual Studio version we support. Review commit: https://reviewboard.mozilla.org/r/54876/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/54876/
Assignee | ||
Comment 3•8 years ago
|
||
There is probably a way to dynamically retrieve the version. But rather than take the chance we'd query the wrong thing, let's just parse the version that Visual Studio writes to the solution file when saving it and use it. With this change, generating the VisualStudio build backend should not change any files unless the build config has changed. This means we can generate Visual Studio files at will without causing Visual Studio to complain about the solution and other files changing and needing reloading. Review commit: https://reviewboard.mozilla.org/r/54878/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/54878/
Assignee | ||
Comment 4•8 years ago
|
||
Now that the VisualStudio backend will no-op if nothing has changed, it should be safe to always run this backend. On first run, backend generation takes ~3.5s on my machine. On subsequent run, it takes ~1.5s. Wall time for a no-op config.status is now ~15.7s. We could like make the Visual Studio backend faster by not writing so many project files. But this would require consolidating libraries in moz.build files. And that's out of scope for this change. Review commit: https://reviewboard.mozilla.org/r/54880/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/54880/
Comment 5•8 years ago
|
||
Will there be an option to NOT TO generate stuff automatically? I use my own solution.
Assignee | ||
Comment 6•8 years ago
|
||
You can put your solution in a separate directory. Or we can add an explicit configure flag to enable/disable the generation. (I have a feeling glandium may push back on this patch because I didn't make the backend conditional. I'm not sure how all this new configure stuff works, which is why I asked him for the review.) Long term, I'd like to know why your solution is better than what we generate and have the built-in solution generation improve to accommodate your needs. Please file a bug describing the advantages of your approach so we can have a discussion.
Comment 7•8 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #6) > You can put your solution in a separate directory. That's the last thing I want to do, sorry. > Or we can add an explicit > configure flag to enable/disable the generation. Please do. > (I have a feeling glandium > may push back on this patch because I didn't make the backend conditional. > I'm not sure how all this new configure stuff works, which is why I asked > him for the review.) > > Long term, I'd like to know why your solution is better than what we > generate and have the built-in solution generation improve to accommodate > your needs. Please file a bug describing the advantages of your approach so > we can have a discussion. I'm used to it for long years - strongest reason, have only included modules which I work with (each one is a separate project, so that solution explorer nicely copies native moz src dir structs, can build just a single module easily), have more run configs (release/debug/?), can build binaries from IDE to get errors. But also has drawbacks, like constantly creating temp dirs in the tree, have to sync when files are added/removed manually (crazy, that IDE doesn't do it for me) I never tried the generated solution honestly. Anyway, I think making this feature optional is something you really should do...
Comment 8•8 years ago
|
||
Comment on attachment 8755902 [details] MozReview Request: Bug 1275297 - Use proper header in solution file; r?chmanchester https://reviewboard.mozilla.org/r/54874/#review51582
Attachment #8755902 -
Flags: review?(cmanchester) → review+
Comment 9•8 years ago
|
||
Comment on attachment 8755903 [details] MozReview Request: Bug 1275297 - Write MinimumVisualStudioVersion to solution file; r?chmanchester https://reviewboard.mozilla.org/r/54876/#review51584
Attachment #8755903 -
Flags: review?(cmanchester) → review+
Comment 10•8 years ago
|
||
Comment on attachment 8755904 [details] MozReview Request: Bug 1275297 - Write VisualStudioVersion to solution file; r?chmanchester https://reviewboard.mozilla.org/r/54878/#review51590
Attachment #8755904 -
Flags: review?(cmanchester) → review+
Comment 11•8 years ago
|
||
Comment on attachment 8755905 [details] MozReview Request: Bug 1275297 - Create Visual Studio project files by default on Windows; r?glandium https://reviewboard.mozilla.org/r/54880/#review51620 Please file a followup to allow disabling it (and I'll hijack it with a broader scope)
Attachment #8755905 -
Flags: review?(mh+mozilla) → review+
Comment 12•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/5b21a1d4a2a2 https://hg.mozilla.org/integration/mozilla-inbound/rev/6f9239fe63f8 https://hg.mozilla.org/integration/mozilla-inbound/rev/b0fac0d672e2 https://hg.mozilla.org/integration/mozilla-inbound/rev/408319d87eac
Had to back out the last commit from this in https://hg.mozilla.org/integration/mozilla-inbound/rev/836ded5dd332 for Windows SM build bustage: https://treeherder.mozilla.org/logviewer.html#?job_id=28605472&repo=mozilla-inbound
Comment 14•8 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4472f0c5c392 https://hg.mozilla.org/integration/mozilla-inbound/rev/3b9f92c4aeee
Assignee | ||
Comment 15•8 years ago
|
||
glandium IRC reviewed those last 2 commits (technically a new commit and a fixup for another commit). He said I should file a follow-up to disable VisualStudio generation if we're doing a non-MSVC build. However, I /think/ the VS files may still be valid for non-MSVC builds. I'm not sure if IntelliSense will work. But all the #defines and build targets should still shell out correctly. Since non-MSVC builds are currently rare, I say we ignore the follow-up for now and add it if people ask for it.
Comment 16•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5b21a1d4a2a2 https://hg.mozilla.org/mozilla-central/rev/6f9239fe63f8 https://hg.mozilla.org/mozilla-central/rev/b0fac0d672e2 https://hg.mozilla.org/mozilla-central/rev/4472f0c5c392 https://hg.mozilla.org/mozilla-central/rev/3b9f92c4aeee
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Updated•6 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•