Skip to content

Fix parsing AbiTag for development compilers #10979

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

Merged
merged 1 commit into from
Jun 17, 2025
Merged

Conversation

TeofilC
Copy link
Collaborator

@TeofilC TeofilC commented Jun 8, 2025

When using a development compiler the compilerId isn't a prefix of the Project Unit Id. This led to a failure to parse the AbiTag.

We extend the parsing logic to handle these cases by only removing the common prefix and then any leading '-'s.

Resolves #10170

Manual QA notes

To test this try using cabal-install with a development version of the compiler, and check that the AbiTag is actually parsed. (I did this with traces locally)


Include the following checklist in your PR:

@TeofilC TeofilC force-pushed the wip/abi-dev-compiler branch 5 times, most recently from 84c4bf9 to 197a397 Compare June 8, 2025 10:48
@TeofilC TeofilC requested a review from mpickering June 8, 2025 11:07
Copy link
Collaborator

@geekosaur geekosaur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a little part of my hindbrain that thinks stripCommon should be in a where unless it's going to be used somewhere else as well, in which case it should be moved somewhere common.

@TeofilC
Copy link
Collaborator Author

TeofilC commented Jun 8, 2025

I get you. I would be happy to move it somewhere else if you have a suitable location in mind. I agree that it feels like more of a general utility

@geekosaur
Copy link
Collaborator

I think someone with a better understanding of the source organization will have to weigh in on that; I'm still learning. (To date I just do reviews and work on CI, and am slowly making my way through the source from an operational standpoint (e.g. understanding IPI, LBI, etc.)

@TeofilC TeofilC force-pushed the wip/abi-dev-compiler branch 2 times, most recently from 9ec3b21 to c8e54ed Compare June 10, 2025 15:24
@mpickering
Copy link
Collaborator

In general, the unit-id of the ghc unit may have no relation to the version of the the ghc compiler itself.

A unit-id can be anything but is prefixed by pkg/version by convention, on darwin systems the package names do not contain vowels for example.

That's something to keep in mind for future, but at least this is an improvement for now.

@TeofilC TeofilC added the merge me Tell Mergify Bot to merge label Jun 15, 2025
@mergify mergify bot added ready and waiting Mergify is waiting out the cooldown period merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days labels Jun 15, 2025
When using a development compiler the compilerId isn't a prefix of the Project Unit Id.
This led to a failure to parse the AbiTag.

We extend the parsing logic to handle these cases by only removing the
common prefix and then any leading '-'s.

Resolves #10170
@Mikolaj Mikolaj force-pushed the wip/abi-dev-compiler branch from c8e54ed to 633c83e Compare June 17, 2025 12:30
mergify bot added a commit that referenced this pull request Jun 17, 2025
@mergify mergify bot merged commit fecbefb into master Jun 17, 2025
55 checks passed
@mergify mergify bot deleted the wip/abi-dev-compiler branch June 17, 2025 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge delay passed Applied (usually by Mergify) when PR approved and received no updates for 2 days merge me Tell Mergify Bot to merge ready and waiting Mergify is waiting out the cooldown period
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cabal accidentally doesn't include abi hash for development compilers
3 participants