Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any reason to version control Elm's `build-artifacts`?

Tags:

elm

Is there any reason to keep elm-stuff/build-artifacts under version control? I was thinking I'd add it to my .gitignore, since it seems to change every time my .elm file changes.

(This project ignores the whole elm-stuff folder, but that seems wrong to me because exact-dependencies.json is in there.)

like image 715
Nathan Long Avatar asked May 30 '16 10:05

Nathan Long


1 Answers

The content of elm-stuff gets generated from your source code so it's generally safe to ignore it's content.

For your question about committing exact-dependencies.json or not I think you should look at what the Rust community suggests for their equivalent cargo.lock.

If you're building an application and if you care about deterministic builds then it's better to commit it. If you are writing a library it's better to leave dependency resolution to the application that is using the library.

Note that Elm enforces semantic versioning so you can have the guarantee that a package upgrade is not going to break your build. That doesn't prevent change in the behaviour, that's why if you want deterministic builds you should commit your exact-dependencies.json.

like image 192
mariosangiorgio Avatar answered Oct 17 '22 05:10

mariosangiorgio