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

Still isolated with writeable home #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

danieroux
Copy link
Contributor

This PR adds new functionality, and builds on top of #10.

shellEnv overrides $JAVA_TOOL_OPTIONS and $HOME to the locked classpath. Great for building, not great for devShells.

lockedClojure is exported from customLocker which allows clojure and clj to be locked in the shell, and $HOME to remain writeable.

The example has been updated accordingly, as well as the example README.

Also added a comment on why CLJ_JVM_OPTS is insufficient for clojure-nix-locker.

@danieroux danieroux mentioned this pull request Mar 17, 2024
@danieroux danieroux force-pushed the still-isolated-with-writeable-home branch 2 times, most recently from 336be2b to b99d169 Compare April 9, 2024 21:58
…ed environments - mainly for shells

- $HOME stays writeable
- Update example to show usage, and how it is different from `shellEnv`
- Document more in `example/README.md`
@danieroux danieroux force-pushed the still-isolated-with-writeable-home branch from b99d169 to e4cc6e6 Compare April 10, 2024 21:03
@danieroux
Copy link
Contributor Author

@whentze this PR adds locker.lockedClojure, which is clojure wrapped with a locked classpath and a writeable $HOME, for use in devShells.

I have also considered calling the wrapping script clojure-locked instead, to make it explicit when the mutable clojure or the locked clojure-locked is used.

What do you think?

@Radvendii
Copy link
Collaborator

I might be responsible for this part of the interface. It was a while ago, so I don't remember. It's worth noting that I work mostly in Nix these days, and have never worked in Clojure. So it's very possible the design was just wrong from the start. There are Clojure devs using this though, so we should check with them. They may just not be using the devShell at all, I'm not sure.

A couple specific questions:

  1. If Clojure using a readonly dependency directory is bad for development, should we just remove it entirely? I'm not sure what the purpose of leaving it in in this half-way state is.
  2. IIRC the reason it was this way to begin with was so that you don't have to re-fetch all the dependencies when you're building with Nix vs. developing. Is there a way around this? Does Clojure have a way of specifying cascading directories? Maybe we could use an OverlayFS?

@whentze
Copy link
Member

whentze commented Apr 23, 2024

Not sure about the rest, but OverlayFS would induce a Linux dependency. clojure-nix-locker currently works on Mac OS as well and it would be nice to keep that. I know at least one person using this software on a Mac.

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