Skip to content

Should .sqlx folder be in .gitignore? #3782

Answered by abonander
Schmiddiii asked this question in Q&A
Discussion options

You must be logged in to vote

Consider the Cargo.lock file. It's a generated file, and thus by your logic, it should always be in the .gitignore, right? But there are merits to checking it into version control, and the cargo new template does this by default.

Of course, things are a little different for libraries, which I see is what you're developing. The advice used to be to not check in the Cargo.lock, because it doesn't matter to the user of the library. But it's still a good idea to check it in, because it helps contributors to the library, by ensuring that they can build with the same set of dependencies and versions that the CI will be using. Also, so every CI run doesn't implicitly run cargo update, which I've…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Schmiddiii
Comment options

Answer selected by Schmiddiii
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants