-
Notifications
You must be signed in to change notification settings - Fork 704
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
SetupHooks: make Location a separate data type #9992
Conversation
I have a question which is not strictly related to the pr
Is there a development branch where I can see the changelog files? Are the changelog files being written somewhere public? Are they already in |
The first version of the Cabal library with support for "build-type: Hooks" will be 3.14, and the Haddocks for the Distribution.Simple.SetupHooks module constitutes the bulk of the documentation for the API. As (I expect and intend) this PR to land before the 3.14 branch is cut, there is no changelog to speak of (the change will be part of the first released version of the API). Does that answer your question? |
It does, thank you. |
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.
Looks like a clear win to me!
c42e371
to
7abaf48
Compare
@mergify rebase |
❌ Unable to rebase: user
|
@mergify rebase |
✅ Branch has been successfully rebased |
7abaf48
to
258a17e
Compare
Let me restart https://github.com/haskell/cabal/actions/runs/9125479546/job/25091745764?pr=9992. It may or may not be transient. |
This does seem to be transient, but common, so let me restart until it passes. |
@mergify rebase |
✅ Branch has been successfully rebased |
258a17e
to
2ba80f1
Compare
@mergify rebase |
✅ Branch has been successfully rebased |
2ba80f1
to
8c18533
Compare
@mergify rebase |
✅ Branch has been successfully rebased |
8c18533
to
f2734b3
Compare
@mergify rebase |
This commit makes Location a separate data type: data Location where Location :: SymbolicPath Pkg (Dir baseDir) -> RelativePath baseDir File -> Location instead of being a type synonym for (FilePath, FilePath). We noted during testing of the Hooks API that it was all too easy to give an incorrect location for rule outputs, e.g. by omitting an extension or using an absolute path. This change allows us to improve the API documentation, as well as clarifying the types to avoid any ambiguities about what kind of file path is expected (FilePath vs SymbolicPath).
✅ Branch has been successfully rebased |
f2734b3
to
6dd579f
Compare
This commit updates the Hooks API, making
Location
a separate data type:instead of being a type synonym for
(FilePath, FilePath)
.We noted during testing of the Hooks API that it was all too easy to give an incorrect location for rule outputs, e.g. by omitting an extension or using an absolute path.
This change allows us to improve the API documentation, as well as clarifying the types to avoid any ambiguities about what kind of file path is expected (
FilePath
vsSymbolicPath
).Template Α: This PR modifies behaviour or interface.