Skip to content

Conversation

@joergdw
Copy link
Contributor

@joergdw joergdw commented Feb 21, 2024

This PR adds a flake that provides both, a package-definition for this cli and a direnv-environment suitable for development on this repository.

Out of scope:

Edit: ⚠️ It looks like go-definitions are not that easy for some reason: https://www.tweag.io/blog/2021-03-04-gomod2nix/ (good source!)

@joergdw joergdw requested a review from a team February 21, 2024 13:37
@joergdw
Copy link
Contributor Author

joergdw commented Feb 21, 2024

Perhaps we should convert the Out of scope section into an issue.

/out/
/pkg/
/bin/
.idea

Choose a reason for hiding this comment

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

I would at least keep the .idea folder to ignore stuff from IntelliJ

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But isn't that an ideal use-case for a global ignore-pattern? See last item in the description of the official documentation

Choose a reason for hiding this comment

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

I doubt most of the people has confgured that, I would really keep it : D

Comment on lines +25 to +28
version =
let
lastModifiedDate = self.lastModifiedDate or self.lastModified or "19700101";
in "${builtins.substring 0 8 lastModifiedDate}-dev";

Choose a reason for hiding this comment

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

Do we get a new version if anything except the flake.nix / flake.lock changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. No, we don't: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix3-flake#flake-reference-attributes

What could be better? 🤔

  • Use current time: That's not reproducable. Identical code produced by identical builders will have two different versions.
  • Just use "dev"? That will work!
  • Stay as we are? At least compared to the option above, we will get a change in the version when the dependencies change (due to implication on vendorHash).

Copy link

@geigerj0 geigerj0 Feb 22, 2024

Choose a reason for hiding this comment

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

It feels like none of the options are ideal as long as we don't have automation which takes care of the versioning.

Just use "dev"? That will work!

I vote for 👆

  • most simple solution
  • everbody can get the version information just by looking at the flake.nix file
  • not much going on in this repo anyhow so consuming always the latest dev-version is not hurting

joergdw and others added 5 commits May 13, 2024 15:26
Co-authored-by: geigerj0 <112163019+geigerj0@users.noreply.github.com>
Co-authored-by: geigerj0 <112163019+geigerj0@users.noreply.github.com>
@joergdw
Copy link
Contributor Author

joergdw commented May 17, 2024

Getting auto-updates to work looks not so easy. The used tool expects the package to update to be reachable via an URL and not via a local path.

Possibilities to continue:

@silvestre silvestre marked this pull request as draft August 30, 2024 15:30
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.

2 participants