Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document non-reproducible outputs #7115

Merged
merged 2 commits into from
Aug 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions compiler/daml-extension/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ genrule(
tools = ["//bazel_tools/sh:mktgz"],
)

# This rule is not reproducible. `vsce package` generates a `.vsix` file which
# is just a zip archive. The order of entries in that archive is
# non-deterministic and the individual entries contain non-reproducible
# timestamps.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we unzip and rezip to fix this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was hoping to find a way to do this with vsce directly, but failing that this should do it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not much to be gained trying to fix this if we cannot fix Navigator. In the end, the thing we really want to be reproducible is the SDK tarball.

genrule(
name = "vsix",
srcs = glob([
Expand Down
9 changes: 9 additions & 0 deletions navigator/frontend/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ nodejs_binary(

# Builds the frontend single page application and bundles all output files
#  (HTML + JavaScript + CSS + images) in a .tgz or .jar archive.
# This target is non-reproducible. The browsercheck and bundle outputs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-reproducible hashes sound very weird 😕

# generated by webpack contain hashes in their file names that are different
# on each invokation. The following were attempted to make the outputs
# reproducible but failed:
# - Use `[contenthash]` instead of `[hash]` (including `output.chunkFilename`), see https://webpack.js.org/guides/caching/
# - Configure `optimization.moduleIds = 'hashed'`, see https://webpack.js.org/configuration/optimization/#optimizationmoduleids
# - Configure `optimization.chunkIds = 'named'`, see https://webpack.js.org/configuration/optimization/#optimizationchunkids
# - Use https://www.npmjs.com/package/webpack-plugin-hash-output
# - Disable source map
genrule(
name = "frontend",
srcs = [
Expand Down