Skip to content

Add support for cabal.project fields to scripts - #7997

Merged
mergify[bot] merged 5 commits into
haskell:masterfrom
bacchanalia:5698
Mar 2, 2022
Merged

mergify[bot] merged 5 commits into
haskell:masterfrom
bacchanalia:5698

Conversation

@bacchanalia

@bacchanalia bacchanalia commented Feb 19, 2022 •

Copy link
Copy Markdown
Collaborator

Closes #5698

Currently, as with the executable block, this just reads it and does not attempt to validate that the fields set are relevant to scripts. I think this is probably fine, but I'm open to discussing it.

@bacchanalia
bacchanalia marked this pull request as draft February 19, 2022 22:57
@gbaz gbaz mentioned this pull request Feb 24, 2022
4 tasks done
@bacchanalia
bacchanalia force-pushed the 5698 branch 2 times, most recently from 9631cb3 to 6fffde7 Compare February 27, 2022 11:05
@bacchanalia
bacchanalia marked this pull request as ready for review February 27, 2022 16:19
Comment thread changelog.d/pr-7851
"cabal-script-<your-sanitized-script-name>" for easier process management.
- Reduce the default verbosity of scripts, so that the build output doesn't interfere with the script output.
- Scripts now support a project metadata block that allows them to use options
that would normally be set in a cabal.project file.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

this just reads it and does not attempt to validate that the fields set are relevant to scripts. I think this is probably fine, but I'm open to discussing it.

a note in docs about that would be enough imo

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

And an issue about adding such validation would be great too

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I added an issue: #8024

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Many thanks, a really good recap, maybe it worths to link the issue in the doc note (as list all the problematic fields would be too verbose)

@jneira jneira left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

great work as usual, many thanks
eager to see the amazing new script support released

Comment thread doc/cabal-commands.rst
main = do
...

Where there cabal metadata block is mandatory and contains fields from a

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This interjects the sentences "With a script that looks like: ... It can either be executed like any other script..." and the context is lost before we get to "It can either". Perhaps change the initial sentence to "A script may looks like this:", then your interjection, then "The script can either be executed like any other script...".

@bacchanalia
bacchanalia requested a review from Mikolaj March 2, 2022 19:19

@Mikolaj Mikolaj left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👌

@bacchanalia bacchanalia added merge me Tell Mergify Bot to merge and removed attention: needs-review labels Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge me Tell Mergify Bot to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for (some) cabal.project-fields to cabal script-metadata

3 participants