[
https://issues.apache.org/jira/browse/YUNIKORN-397?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17191429#comment-17191429
]
Wilfred Spiegelenburg edited comment on YUNIKORN-397 at 9/7/20, 4:07 AM:
-------------------------------------------------------------------------
The version in the go.mod file is added as part of the initialisation of
modules in go. It is part of the modules specification, it has nothing to do
with the IDE.
This is part of the go 1.12 release notes:
{code}
The go directive in a go.mod file now indicates the version of the language
used by the files within that module. It will be set to the current release (go
1.12) if no existing version is present. If the go directive for a module
specifies a version newer than the toolchain in use, the go command will
attempt to build the packages regardless, and will note the mismatch only if
that build fails.
{code}
If there is no go directive specified running most go commands will add it
automatically, using the installed version, as per the reference docs. That
means we could lose control if it is not specified and managed. We could end up
with a far higher version specified than we want. It not only controls
additional features but also turns off older removed features which could have
flow on effects for our dependencies.
was (Author: wifreds):
The version in the go.mod file is added as part of the initialisation of
modules in go. It is part of the modules specification, it has nothing to do
with the IDE.
This is part of the go 1.12 release notes:
{code}
The go directive in a go.mod file now indicates the version of the language
used by the files within that module. It will be set to the current release (go
1.12) if no existing version is present. If the go directive for a module
specifies a version newer than the toolchain in use, the go command will
attempt to build the packages regardless, and will note the mismatch only if
that build fails.
{code}
If there is no go directive specified running most go commands will add it
automatically, using the installed version, as per the reference docs. That
means we could lose control and we could end up with a far higher version
specified than we want. It not only controls additional features but also turns
off older removed features which could have flow on effects for our
dependencies.
> Makefile should use go version from go.mod
> ------------------------------------------
>
> Key: YUNIKORN-397
> URL: https://issues.apache.org/jira/browse/YUNIKORN-397
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: core - common, scheduler-interface, shim - kubernetes
> Reporter: Wilfred Spiegelenburg
> Assignee: Wilfred Spiegelenburg
> Priority: Major
> Labels: pull-request-available
>
> The current build does not use the version that is specified in go.mod as the
> minimal version that we must have for the go tool set.
> The Makefile specifies its own version which might be out of sync (older or
> newer) than the go.mod version. We should only fail the build if the go tools
> are older than the version specified in the go.mod file.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]