add --version-full and compiler info#11339
Conversation
|
This is a proposed change, and open to review and suggestions. |
fe384e3 to
75fef23
Compare
|
Can you show how it'll look like in the description? Also, it'd be good to add some motivation. Remember that by default we expect a ticket before a PR. |
|
The motivation was trying to get that information from someone on Discord who was having odd problems with ETA: misremembered; they were using a Linux-built cabal on FreeBSD. As most OSes don't have built-in Linux emulators, this won't be common; the closest you'd get is Apple's Rosetta(2), which at least has the OS right. I don't consider this final by any means; some programs have a |
916c671 to
aa47f49
Compare
|
I moved that |
12ecf00 to
e9c66f5
Compare
eeda6ef to
475bba6
Compare
|
Updated the title and description to reflect the new implementation. |
--version--version-full and compiler info
475bba6 to
57d796e
Compare
|
Re-requesting reviews because adding a new option makes it a bit more invasive code-wise. |
57d796e to
a617480
Compare
new code needs re-review
|
It just occurred to me: should the |
On FreeBSD ✔️On Linux ✔️On FreeBSD with a statically-linked Linux binaryTBD (waiting for CI to produce the musl binary) |
Sounds potentially useful, e.g., for Linux distribution packagers. |
|
Back to draft until I can work on the |
3efb324 to
941fb74
Compare
|
Okay, I think I have the |
941fb74 to
6e760a7
Compare
|
Do we need to duplicate the whole logic in both Cabal and cabal-install? They will always be compiled by one compiler, right? |
|
I was thinking about that when I added it to |
2856313 to
1086ee6
Compare
This may count as "significant" since it's a new command line option, but it's deliberately out of the way.
1086ee6 to
1cb4d8a
Compare
I'm not sure if this counts as a significant change or not, since it's a new out-of-the-way command line option
The information added by this change is the last line. If a development GHC version is used to build
cabal, the version will include a datestamp (e.g.9.14.0.20251128).The original output of
--versionhas been restored; all new information now lives under--version-full.The reason for this is a perplexing cabal bug report on the FP Discord that turned out to be the user running a Linux build of cabal on FreeBSD. Cabal tends to trust
System.Infofor local system information for some things, but it's hardcoded to the system cabal was built on, not the one it's running on. (I think this can only arise on FreeBSD, although presumably a lesser form might happen on Apple Silicon Macs running an Intel build via Rosetta2.)Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR:
significance: significantin the changelog file.QA notes:
--versionis back to what it was before any of the git revision changes, including spaces--version-fullincludes git information (if supported) and compiler informationcabal exec cabal -- act-as-setup -- --version-fullincludes git (if available) and compiler informationCaballibrary and have aSetup.hssitting around, verify thatrunhaskell Setup.hs -- --version-fullworks and includes themCabalthan comes with the currentghc?