Originally created by @jjuliano on GitHub (Aug 10, 2024).
When running go mod tidy, the version must be prefixed with a 'v'. However, the file at https://github.com/apple/pkl/blob/0.25.2/stdlib/Project.pkl#L276 expects the version without the 'v'. Since I've placed the generated Go files in a separate repository, the default behavior of go mod tidy will fail to locate the package if the version is not prefixed with the 'v'.
Originally created by @jjuliano on GitHub (Aug 10, 2024).
When running `go mod tidy`, the version must be prefixed with a 'v'. However, the file at https://github.com/apple/pkl/blob/0.25.2/stdlib/Project.pkl#L276 expects the version without the 'v'. Since I've placed the generated Go files in a separate repository, the default behavior of `go mod tidy` will fail to locate the package if the version is not prefixed with the 'v'.
I have resolved it by defining a regexp on the PklProject
version = read?("env:VERSION").replaceFirst(Regex("^v(\\d+\\.\\d+\\.\\d+)(-[\\w\\.]+)?(\\+[\\w\\.]+)?$"), "$1")
@jjuliano commented on GitHub (Aug 10, 2024):
I have resolved it by defining a regexp on the PklProject
```
version = read?("env:VERSION").replaceFirst(Regex("^v(\\d+\\.\\d+\\.\\d+)(-[\\w\\.]+)?(\\+[\\w\\.]+)?$"), "$1")
```
I don't think we will support a leading v, because that leads to ambiguous situations (what do you do if there is both v1.0.0 and 1.0.0?)
Your workaround seems like a good solution!
@bioball commented on GitHub (Sep 6, 2024):
I don't think we will support a leading `v`, because that leads to ambiguous situations (what do you do if there is both v1.0.0 and 1.0.0?)
Your workaround seems like a good solution!
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @jjuliano on GitHub (Aug 10, 2024).
When running
go mod tidy, the version must be prefixed with a 'v'. However, the file at https://github.com/apple/pkl/blob/0.25.2/stdlib/Project.pkl#L276 expects the version without the 'v'. Since I've placed the generated Go files in a separate repository, the default behavior ofgo mod tidywill fail to locate the package if the version is not prefixed with the 'v'.@jjuliano commented on GitHub (Aug 10, 2024):
I have resolved it by defining a regexp on the PklProject
@bioball commented on GitHub (Sep 6, 2024):
I don't think we will support a leading
v, because that leads to ambiguous situations (what do you do if there is both v1.0.0 and 1.0.0?)Your workaround seems like a good solution!