Skip to content
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

Add granular settings defaults (defaults.settings.{local, defined, all}) #275

Merged
merged 14 commits into from
Apr 20, 2024

Conversation

shivaraj-bh
Copy link
Contributor

@shivaraj-bh shivaraj-bh commented Mar 14, 2024

resolves #261

defaults.settings.default-{current, defined, all} replaces defaults.settings.default

TODO:

  • Add tests

@shivaraj-bh shivaraj-bh changed the title add default-{current, defined, all} settings defaults; rm defaults.settings.default add default-{current, defined, all} settings defaults Mar 14, 2024
Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

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

Nice. Quick review.

  • A separate ./test/*/flake.nix would be good for testing defaults.
  • Rebase new master (docs: How to work with local packages #276), and add documentation in docs/defaults.md
    • Let's elaborate the examples in the Markdown docs, and have the option description link to them.
  • Not sure about the defaults.settings.default-foo naming; let me think about it.

@srid
Copy link
Owner

srid commented Apr 10, 2024

cf. #301

@shivaraj-bh
Copy link
Contributor Author

added tests: 1858124

Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

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

My CI is down, but running nixci build locally fails:

$ nixci build https://github.com/srid/haskell-flake/pull/275
[..]
$ nix log /nix/store/n1qm2m8qmg3d7q25swl3h8cqxhsng9na-haskell-flake-test-0.1.0.0.drv | tail -6
warning: The interpretation of store paths arguments ending in `.drv` recently changed. If this command is now failing try again with '/nix/store/n1qm2m8qmg3d7q25swl3h8cqxhsng9na-haskell-flake-test-0.1.0.0.drv^*'
Configuring haskell-flake-test-0.1.0.0...
CallStack (from HasCallStack):
  withMetadata, called at libraries/Cabal/Cabal/src/Distribution/Simple/Utils.hs:368:14 in Cabal-3.10.1.0:Distribution.Simple.Utils
Error: Setup: Encountered missing or private dependencies:
hello

@shivaraj-bh
Copy link
Contributor Author

My CI is down, but running nixci build locally fails:

I fixed and tested on Linux.

hello wasn’t a great example to use anyway, it isn’t a library package. I switched over to random package.

@srid srid added this to the 0.5.0 milestone Apr 19, 2024
Copy link
Owner

@srid srid left a comment

Choose a reason for hiding this comment

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

LGTM, just not sure what emptyPackageSettings is for exactly. When I replace it with {}, the test still passes.

nix/modules/project/settings/default.nix Outdated Show resolved Hide resolved
@srid srid changed the title add default-{current, defined, all} settings defaults Add granular settings defaults (defaults.settings.{local, defined, all}) Apr 19, 2024
@srid srid merged commit 53e434d into srid:master Apr 20, 2024
1 check failed
@shivaraj-bh shivaraj-bh deleted the settings-defaults branch April 20, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fine-grained settings defaults
2 participants