New build has version `unknown`
~/P/unison (master) [i] ⋊> ucm
Now starting the Unison Codebase Manager (UCM)...
| | |||_ ___ ___ | | | | |_ -| . | | |||||||||
👋 Welcome to Unison!
You are running version: unknown
📚 Read the official docs at https://www.unison-lang.org/docs/
Hint: Type 'projects' to list all your projects, or 'project.create' to start something new.
wordle/main>
Fresh build an hour ago from the `Download Zip' file.
That would be coming from this code.
What does git describe --tags --always --dirty="'" return on your system? I wonder if it can't find git on the path or if you have cloned the repo without pulling its tags or something.
Possibly downloaded unison release source ~~.zip~~ tarball?
Oh I assumed that this was built from source. @ndearns can you please specify how you obtained this version of ucm?
From the main unison page, I picked the Code drop down and grabbed the 'Download Zip' file. This expands into a 'unison-trunk' directory. I went into that and did the 'stack build...' thing.
'stack install unison' fails to come up with a build plan, so I use a soft link from /usr/bin/ucm -> /unison-trunk/.stack-work/install/x86_64-linux/273e09a1cfdcf654a3879d5f9157f5da538c54227fd37c349f06422e7ed51e56/9.6.5/bin/unison
I don't remember having to do all this when I first installed unison, but that was quite a while ago.
BTW, I'm on UK time so if I'm not responding it may mean I'm asleep ;-)
Ah okay that makes sense then. If you just grabbed the source code without the git repository and built from that source as opposed to pulling a pre-built binary, there wouldn't really be any way for it to know the version number. I suppose that you could work around that by maintaining a metadata file under source control that gets changed for each version. But this seems like a fairly niche use-case; I imagine that almost everyone is going to either pull a pre-built binary or clone the git repo. So I don't know if it's worth jumping through many hoops to show something other than "unknown" in this case. Perhaps you could change the output to something more helpful than unknown without actually being a meaningful version number. Probably @aryairani's call to make.
I think it would be good to fix this, but it's a low priority. I'm going to leave the ticket open.
There was the separate issue where it talked about the codebase schema being from too old of a version of ucm, and I'm not sure how that factors into this issue if at all, but that could at least be improved. e.g. maybe list the schema versions in the error, and in the version command output.
Yeah, this build is working fine with the libs I downloaded yesterday.