Should .sqlx
folder be in .gitignore
?
#3782
-
We are currently unsure whether the What is the correct way to handle the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Consider the 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 Bottom line, even though it's a generated file, it enables reproducible builds, which tends to be pretty important to mitigate "works on my machine"-type issues. (I also noticed that you actually don't have a It's the exact same idea with the
How about in the actual documentation? Says right there in step 3:
It's also in the README for At the end of the day though, it's all about tradeoffs. If you think it should be checked in, check it in. If you don't, then don't. If you were looking for a dogmatic answer, you came to the wrong place. |
Beta Was this translation helpful? Give feedback.
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 thecargo 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 runcargo update
, which I've…