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

Update flake and improve nix setup for development #2855

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Conversation

bugarela
Copy link
Collaborator

@bugarela bugarela commented Mar 7, 2024

Hello :octocat:

This PR:

  1. Updates flake.nix to remove sourcing of .envrc file which resulted in a circular dependency if direnv was used to load nix. Other changes in flake.nix are just auto-formatting.
  2. Adds instructions to CONTRIBUTING.md with how to use nix with direnv.
  3. Updates flake.lock (with nix flake update) so the pinned version of metals is compatible with the scala version declared in build.sbt.

@bugarela bugarela requested a review from shonfeder as a code owner March 7, 2024 20:23
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.89%. Comparing base (c518278) to head (70d6603).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2855      +/-   ##
==========================================
+ Coverage   78.88%   78.89%   +0.01%     
==========================================
  Files         467      467              
  Lines       15956    15956              
  Branches     2625     2625              
==========================================
+ Hits        12587    12589       +2     
+ Misses       3369     3367       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@shonfeder shonfeder left a comment

Choose a reason for hiding this comment

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

LGTM!

CONTRIBUTING.md Outdated
Comment on lines 208 to 213
If you want to use direnv to setup your environment with nix (instead of using a
shell), you will need to add `use flake;` to your `.envrc`, and then running
`direnv allow`:

```sh
echo "use flake;" >> .envrc && direnv allow
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the .local-envrc could be used for this without requiring dirtying the worktree?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah right, that should be better! Thanks

@bugarela bugarela enabled auto-merge March 8, 2024 12:01
@bugarela bugarela merged commit 811b480 into main Mar 8, 2024
10 checks passed
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.

3 participants