-
Notifications
You must be signed in to change notification settings - Fork 722
add --version-full and compiler info
#11339
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
base: master
Are you sure you want to change the base?
Conversation
|
This is a proposed change, and open to review and suggestions. |
fe384e3 to
75fef23
Compare
Mikolaj
left a comment
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
|
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. |
Mikolaj
left a comment
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.
LEBTM
|
|
||
| Git revision information still is not provided for release builds, largely to avoid bootstrapping issues when building GHC. (Both cabal-install (not distributed, but used by hadrian) and the Cabal library are built as part of GHC builds.) | ||
|
|
||
| This _shouldn't_ affect most people, unless someone has been relying on the output of `--version` instead of using `--numeric-version`; but they would have been forced to support both output forms, and that only if supporting unreleased cabal builds. |
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.
Is this still relevant with this new setup and better backward compatibility?
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.
Strictly speaking, adding a command line option is an interface change and should get a changelog entry.
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.
@geekosaur I don't think Mikolaj doubts the need for changelog. I think he means the exact phrase about "relying on --version" that this comment is attached to. I agree that it looks outdated.
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's not really outdated, since such builds are already out there most likely. As such it's intended as a warning to anyone using such unreleased versions, which is part of the point of changelogs, no?
|
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 |
23e60e3 to
2856313
Compare
This may count as "significant" since it's a new command line option, but it's deliberately out of the way.
2856313 to
1086ee6
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?