Skip to content

Commit

Permalink
Add release note for FAB-17725
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm authored and Brett Logan committed Apr 9, 2020
1 parent 08df2e1 commit 10ed627
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions release_notes/v2.1.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

Fixes
-----

**FAB-17725: Omit go.mod and go.sum from package when not in module mode**

In certain environments, it's possible to package chaincode that is structured
as a module from an active GOPATH. This often happens when the path provided
to the package command is an import path resolvable from the GOPATH instead of
a file system path.

If the package can successfully build in the packaging environment from the
import path, the chaincode dependencies are calculated and packaged from the
GOPATH for compilation as a traditional go package.

In this scenario where the code at the import path is structured as a module,
the go.mod would be included in the chaincode package as packaging always
includes all non-hidden files in the top level folder of the import path.

On the server, the presence of the go.mod implies that the build process
should execute in module mode. When the dependencies have been vendored in the
module, the build uses -mod=vendor flag to indicate the module requirements
should be satisfied from the vendor folder. Unfortunately, since the
chaincode dependencies were packaged using GOPATH mode instead of module mode,
there are some metadata files missing from the vendor folder that are expected
by the module mode build process.

To help prevent this from occurring, we will explicitly omit go.mod and go.sum
from top level folder of chaincode that is not packaged in module mode.

0 comments on commit 10ed627

Please sign in to comment.