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

nix: add example on how to use a library locally #3337

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

laurenceisla
Copy link
Member

Added an example on how to use a local library for development purposes. Useful to debug said library in the context of PostgREST development.

Comment on lines 37 to 41
#
# To try a modified library locally (for development purposes only), see this gist as example:
# https://gist.github.com/laurenceisla/de88d975b894074c989feffa0c5611cc
#
Copy link
Member

Choose a reason for hiding this comment

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

I think is the wrong place to put it. And I think we shouldn't link to a gist there.

How about just adding a section to nix/README.md?

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I get it. Only production ready examples should be used there.

OK, I'll be adding a new section to that README.

Copy link
Member

@steve-chavez steve-chavez Mar 19, 2024

Choose a reason for hiding this comment

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

@wolfgangwalther @laurenceisla For Locality of Behaviour, how about keeping this comment on the nix/overlays/haskell-packages.nix?

It'll be much better if anyone can just read the file and then find the way.. I've also had this use case many times.

Copy link
Member

Choose a reason for hiding this comment

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

Your workflow happens to be to start looking in this file, because you have learned in the past that you will need to touch this file to tell nix about haskell dependencies. But as I said earlier: Managing dependencies should start somewhere else.

The link describes changes to this file, cabal.project, stack.yaml and a copy of another repo entirely. It's just one of the files that is changed here, this is not about this file. This is really something for a "developer documentation" - and nix/README.md is the closest we have, even though this is not about nix only.

Copy link
Member

Choose a reason for hiding this comment

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

However: Instead of me telling you "you're doing it wrong" all the time ;)... maybe we can add a hint with this kind of explanation to the overlay file? I.e. something along the times "note, that this shouldn't be the first place to start adding dependencies to, also have a look here and there" etc.

Copy link
Member

Choose a reason for hiding this comment

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

However: Instead of me telling you "you're doing it wrong" all the time ;)...

I like being told I'm wrong! 😄

maybe we can add a hint with this kind of explanation to the overlay file?

Sounds good!

Copy link
Member Author

Choose a reason for hiding this comment

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

maybe we can add a hint with this kind of explanation to the overlay file?

Did that, not sure if more info is needed here. Added a mention to the Nix README too, for local packages.

Co-authored-by: Wolfgang Walther <wolfgangwalther@users.noreply.github.com>
@laurenceisla laurenceisla merged commit 3f16253 into PostgREST:main Mar 26, 2024
26 checks passed
@laurenceisla laurenceisla deleted the nix-local-example branch March 26, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants