As the title says, we need to pull the latest changes from repo every time we execute build_all.sh.
For instance, @Araq updated the latest csources to 0.19.0 and I did not realize it until I remembered that csources are actually a sub-repo inside Nim itself and went to pull the changes myself.
Wouldn't make sense to let this script do all work for me?
I don't understand this, build_all.sh does [ -d csources ] || echo_run git clone --depth 1 https://github.com/nim-lang/csources.git by design.
The version of csources is not very important anyway, 0.18 can build 0.19 just fine afaik.
[ -d csources ] || echo_run git clone --depth 1 https://github.com/nim-lang/csources.git
That only clones the csources if the csources dir doesn't exist. But if it already exists, nothing is done (no pull).
Alright, if it's not important then it does not need an update...I guess!
But I will have to remind myself that csources is a repository and maybe, just maybe there might be a new update that I should care about in the future.
it does not need an update...I guess!
I think that it does.
@Araq If the csources directory exists, a git pull should be done. Better yet, add csources as a git submodule, so that this manually csources pull/clone is not needed. Then you just need git submodule update --recursive --remote.
Hence I vote for: Remove build_all.sh. Just use your own scripts, I don't want to maintain your personal Unix environments.
How about add it as part of koch building procedure, much like we do with ./koch boot -d:release, but a different option to build everything for us?
It's just a thought.
Well, if the directory csources already exists, you probably have nim installed already, so you can keep updating, there is no need to bootstrap again. Just pull the main repo and relaunch koch
If you want to automate this, I have this script or there is choosenim
Regarding using koch to build everything, it just koch boot -d:release; koch tools
Well, if the directory csources already exists, you probably have nim installed already, so you can keep updating, there is no need to bootstrap again. Just pull the main repo and relaunch koch
That's what I do already.
Regarding using koch to build everything, it just
koch boot -d:release; koch tools
I know, as I said, that's what I do already. What I mean by saying build everything, I meant pull the latest updates from both csources and Nim itself.
But it's alright; I will continue doing what I already do.
What I mean is that there is no need to pull csources after the first time you build Nim ever. You can keep updating forever, using your current version of Nim to build the next one. csources are used purely for bootstrapping
That's good to know.
If that's the case, then I wonder why @Araq updated csourses to match version 0.19.0.
That's so that 5 years down the line if anyone wants to build 0.19.0, they have the corresponding csources. That's what choosenim uses as well so having both is good practice.
Hence I vote for: Remove build_all.sh. Just use your own scripts, I don't want to maintain your personal Unix environments.
+1
I've thought this from the beginning, and then I thought it again when you rejected the PR to add a .bat script. So now we've got instructions that are just a mess. Earlier we could at least mostly copy and paste it, now we need to context switch between "steps" that are OS-dependent.
We shouldn't be holding the user's hand to build a bleeding edge Nim. When we do this we end up losing details like the one @stefanos82 ran into. You need to run all the steps yourself to understand what goes on behind the scenes. If that's such a bother then yes, write yourself a script and run that. If you want convenience then use choosenim or create your own script.
Most helpful comment
I don't understand this,
build_all.shdoes[ -d csources ] || echo_run git clone --depth 1 https://github.com/nim-lang/csources.gitby design.The version of
csourcesis not very important anyway, 0.18 can build 0.19 just fine afaik.