Open emil14 opened 5 months ago
snapshot_id
Possible solution
Every time we (re)compile compiler (not when we run it!) we calculate some "snapshot id".
That ID (which is probably UUID or UNIX timestamp) is somehow inserted into stdlib (maybe into neva.yaml
as some metadata).
When compiler reads stdlib from disk (if it's there, otherwise it simply reads it) it ensures that this snapshot_id
in stdlib is exactly the same as in the compiler's binary. If they don't match, it erases the stdlib on the disk and replaces it with the embedded one (with the right snapshotID).
P.S - we could use go generate
and maybe embed
to handle that.
snapshot_id
or (even better, if possible) rewrite builder in a way it can use embedded FS along with normal one - that would be perfect.Status changed to minor because now this is basically performance issue. Actually not even an issue but performance optimisation idea (that feels like it has to be done tho).
It's not clear and should be fixed somehow