Closed andrewemeryanz closed 4 years ago
Versioning is currently via go.mod, which controls versioning at the module level. There might be a case for per-import versioning, though that's a significant impact to our current approach. @ChloePlanet
Versioning is currently via go.mod
What's the right setup to get this behaviour? Given the following files:
go.mod # containing sysl-go v0.72.0 (a couple of versions behind the latest)
service.arrai
If I run arrai service.arrai
then go.mod
gets bumped up to sysl-go v0.74.0
(the latest version).
--
Version : DIRTY-v0.109.0
Git commit : 50b6ba3e1789cec84acb8625364dd3bd24b8a18b
Date : 2020-08-04T01:01:45Z
OS/arch : darwin/amd64
Go version : go1.14.1 darwin/amd64
That might be a design bug. Running the code shouldn't update version information in go.mod. It might be doing that as a side effect of automatically filling in any missing dependencies. If so, we should remove the automatic update, which would be a slight inconvenience, but safer.
Yes the dependent packages should not be updated. Will fix that. In terms of support importing specified version, I could turn to it after the current ticket is done.
Thanks @ChloePlanet. What is the behaviour of import versioning? Does arrai
need a go.mod
file if it's using module imports or does it fetch the latest if one can't be found? Where does it look for go.mod
?
arrai
is using the same dependency management strategy as sysl
which is based on go modules (go mod
).
It checks the modules listed in go.mod
first and go get
it if it's not downloaded yet.
So for this issue, did you raise it because arrai packages automatically update the package and you want to disable it, or just want to import an old version of a package?
Had a chat with @ChloePlanet. Answering some questions here.
So for this issue, did you raise it because arrai packages automatically update the package and you want to disable it, or just want to import an old version of a package?
I want to import the version listed in the go.mod
file (and I don't want the go.mod
file to be changed as a result of execution).
Does arrai need a go.mod file if it's using module imports or does it fetch the latest if one can't be found?
It needs a go.mod
file and will error out if one isn't found.
Where does it look for go.mod?
In the current working directory.
The automatic update is removed by #544.
@ChloePlanet I'm still seeing the behaviour where the version in the go.mod
file is updated to the latest version when using arrai v0.112.0
.
Purpose
arr.ai imports are currently unversioned:
The current behaviour is to always retrieve the latest repository version:
Imports should be versionable:
References
https://github.com/arr-ai/arrai/issues/504