You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse content of the version-var configuration to determine the package path and variable
Fail/error if format is not correct
Load the target package using the Go packages API
Note that we need to consider the directory that is the build target as well, since "main" is a valid package identifier and, in that case, the directory location matters
Look up the named variable to verify that it exists in the package
Possibly verify the type as well
Error output should clearly indicate what failed:
"unable to set version variable: package a.b.c does not exist"
"unable to set version variable: variable "version" not in package a.b.c"
"unable to set version variable: variable "version" is not of type string" (may need to verify if this is truly an error case)
What happened?
Sometimes version-var can have typos/incorrect package names after renames/moves/etc.
What did you want to happen?
Instead of silently dropping the version substitution, it would be much nicer UX if we errored/warned and alerted the user.
The text was updated successfully, but these errors were encountered: