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 Devbox environment config #1754

Closed
wants to merge 1 commit into from

Conversation

DavidOliver
Copy link
Contributor

@DavidOliver DavidOliver commented Aug 22, 2023

Devbox uses Nix, a purely functional package manager, and provides a simple way to take advantage of that without requiring learning of the Nix language.

I'm suggesting adding its two devbox.(json|lock) files for optional usage because:

  • I use it and the config being present in the main branch would mean I don't have to switch branches and subsequently cherry-pick to contribute 😃
  • it provides a simple, declarative way of specifying and using versions (Elixir, Node, and Chrome for the JS tests) across MacOS, Linux and Windows without having to otherwise install them or deal with images.

Installation is a curl command. Then, to use in a project with the devbox files:

$ devbox shell

The specified versions of Elixir, Node and Chrome are installed/activated, and the mix setup command is called so that Elixir and Node dependencies are also installed if they're not already present.

Versions currently specified:

  • Elixir 1.15.4
  • Node 18.16.1
  • Chrome 115.0.5790.170 (latest available for Nix)

@wojtekmach
Copy link
Member

Devbox looks like an interesting and useful tool. That being said I’m probably not gonna use it on this particular project because I tend to use Elixir main while developing ExDoc, making sure Elixir docs are not broken, testing new features, etc. So I’m personally -1 on including it. But I can totally see how it could remove some barrier to contributing.

@whatyouhide
Copy link
Member

I’m not sure this is an issue that is shared by many devs working on ex_doc.

I use it and the config being present in the main branch would mean I don't have to switch branches and subsequently cherry-pick to contribute

Can't you put this file in .git/info/exclude in your repo, so that you don't have to check it out? 😬

@DavidOliver DavidOliver force-pushed the devbox branch 2 times, most recently from bc7c0e0 to 5504a30 Compare September 8, 2023 07:59
@josevalim
Copy link
Member

Closing this for now. I agree with @wojtekmach that we may not use it, we often test against Elixir main, but please try @whatyouhide's suggestion and, if that doesn't work, I am fine with updating our .gitignore to include it. Thank you!

@josevalim josevalim closed this Sep 12, 2023
@DavidOliver
Copy link
Contributor Author

Thanks for the consideration and replies. :)

I wanted the Devbox config to be version-controlled, so I've gone with a parent git repo which has ExDoc as a submodule.

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.

4 participants