Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Stable hash fix #1095

Merged
merged 7 commits into from
Jun 15, 2020
Merged

Stable hash fix #1095

merged 7 commits into from
Jun 15, 2020

Conversation

Velenir
Copy link
Contributor

@Velenir Velenir commented Jun 10, 2020

Sorta fix, please try on different machines on node v12

IPFS hash of dist QmNc3PH6sup1S324Vy7n45c7PEUyT71xWuFQpytmBxbM9Y
QmcyAq4hcixRUN7HTKf2jXD37HpHBSoauvPDGygJqGixkh

My ls -1 dist/

List

0dda5618c0d71a913ff55ddfe1a9556f.svg
175a9fc03995fdcd4071a4b6cf6d729f.svg
6407f8f1e2b66fe534e67c00522e9a42.svg
6ddcce99d9ec12220e0f78621130bb81.svg
70e1546cb31f915982f5ca933e111a0d.svg
7233bf7efb01021a1c99efa0349c7440.svg
8f446b386d6210378636576cea38faed.png
9a3038b98e535f97fae2d630d1c9a82f.svg
assets
autoconnect_chunk~f9abe98c.118a820016de8b28d159.js
autoconnect_chunk~f9abe98c.118a820016de8b28d159.js.map
ca51f1b062e5fac0c9c8e6723f916b0f.svg
cbebdb195faa8383b5246c50a369c5ad.svg
d59af6af2f821c0b95d35e65454755ac.svg
detect-browser~67af1680.f600d7ef6faf90c13e2e.js
detect-browser~67af1680.f600d7ef6faf90c13e2e.js.map
e2b4fc959375b405ed8d59bf769c6a2e.svg
Extra_routes_chunk~31ecd969.d5624a198bf65c7dde64.js
Extra_routes_chunk~31ecd969.d5624a198bf65c7dde64.js.map
f25fb16b42e73aef17d4eaf97a126fab.svg
fd290490390852435f8ef9a05c2e48c1.svg
index.html
Inter-Bold.woff2
Inter-Regular.woff2
main~e2e93592.6bdc375327c5bfc556c4.js
main~e2e93592.6bdc375327c5bfc556c4.js.map
OrderBook_chunk~31ecd969.cef489cdd1b7d22717b1.js
OrderBook_chunk~31ecd969.cef489cdd1b7d22717b1.js.map
OrderBook_chunk~Trade_chunk~21833f8f.01205b7e11afade28ea3.js
OrderBook_chunk~Trade_chunk~21833f8f.01205b7e11afade28ea3.js.map
OrderBook_chunk~Trade_chunk~Wallet_chunk~f71cff67.2dd87dfdf0358c7c5f47.js
OrderBook_chunk~Trade_chunk~Wallet_chunk~f71cff67.2dd87dfdf0358c7c5f47.js.map
Orders_chunk~31ecd969.5abe0244a76e948743e1.js
Orders_chunk~31ecd969.5abe0244a76e948743e1.js.map
Orders_chunk~Trade_chunk~31ecd969.0f212abe520b6b911d26.js
Orders_chunk~Trade_chunk~31ecd969.0f212abe520b6b911d26.js.map
RobotoMono-Regular.woff2
runtime~main.8dc8d5be6a2778b6f84d.js
runtime~main.8dc8d5be6a2778b6f84d.js.map
Strategies_chunk~31ecd969.106031ff60f72ae8ae66.js
Strategies_chunk~31ecd969.106031ff60f72ae8ae66.js.map
Strategies_chunk~Trade_chunk~Wallet_chunk~21833f8f.ad0ff796bee193d78228.js
Strategies_chunk~Trade_chunk~Wallet_chunk~21833f8f.ad0ff796bee193d78228.js.map
toastify~845340c6.a62efbc4b6116947d852.js
toastify~845340c6.a62efbc4b6116947d852.js.map
Trade_chunk~31ecd969.22c9e549987ea3f27cdd.js
Trade_chunk~31ecd969.22c9e549987ea3f27cdd.js.map
vendors~main~253ae210.2e1ccb2af5d97f676295.js
vendors~main~253ae210.2e1ccb2af5d97f676295.js.map
vendors~main~56d47301.07b440775e4626099ad2.js
vendors~main~56d47301.07b440775e4626099ad2.js.map
vendors~main~7274e1de.d8dee898c0cb0b8c51af.js
vendors~main~7274e1de.d8dee898c0cb0b8c51af.js.map
vendors~main~9c5b28f6.57b7b3ed4b7c7e3b350c.js
vendors~main~9c5b28f6.57b7b3ed4b7c7e3b350c.js.map
vendors~main~bd3a21fe.613879e7d46b032e2d1a.js
vendors~main~bd3a21fe.613879e7d46b032e2d1a.js.map
vendors~main~cfbf0a2e.86df798ef3c560bc8941.js
vendors~main~cfbf0a2e.86df798ef3c560bc8941.js.map
vendors~OrderBook_chunk~Trade_chunk~0f485567.cd34bf4b51ade8123879.js
vendors~OrderBook_chunk~Trade_chunk~0f485567.cd34bf4b51ade8123879.js.map
vendors~OrderBook_chunk~Trade_chunk~32a4aece.ef8aa2a36663f9c1a6db.js
vendors~OrderBook_chunk~Trade_chunk~32a4aece.ef8aa2a36663f9c1a6db.js.map
vendors~OrderBook_chunk~Trade_chunk~52053254.57eb733fd2f4b254849e.js
vendors~OrderBook_chunk~Trade_chunk~52053254.57eb733fd2f4b254849e.js.map
vendors~OrderBook_chunk~Trade_chunk~5613732f.e6e57956d0a76a13af3f.js
vendors~OrderBook_chunk~Trade_chunk~5613732f.e6e57956d0a76a13af3f.js.map
vendors~OrderBook_chunk~Trade_chunk~7bf4bf8e.c715d686529c7821e9a4.js
vendors~OrderBook_chunk~Trade_chunk~7bf4bf8e.c715d686529c7821e9a4.js.map
vendors~OrderBook_chunk~Trade_chunk~899a4fd7.b6ca587f4821fd4f9ce1.js
vendors~OrderBook_chunk~Trade_chunk~899a4fd7.b6ca587f4821fd4f9ce1.js.map
vendors~OrderBook_chunk~Trade_chunk~9c5b28f6.05054f3d4341af1f4259.js
vendors~OrderBook_chunk~Trade_chunk~9c5b28f6.05054f3d4341af1f4259.js.map
vendors~OrderBook_chunk~Trade_chunk~a24c8af9.a34d338024337544979c.js
vendors~OrderBook_chunk~Trade_chunk~a24c8af9.a34d338024337544979c.js.map
vendors~OrderBook_chunk~Trade_chunk~a80bcd6b.c728a49da80c07386f8e.js
vendors~OrderBook_chunk~Trade_chunk~a80bcd6b.c728a49da80c07386f8e.js.map
vendors~OrderBook_chunk~Trade_chunk~ca2e6178.5f6b7c2723d1e6f1882c.js
vendors~OrderBook_chunk~Trade_chunk~ca2e6178.5f6b7c2723d1e6f1882c.js.map
vendors~OrderBook_chunk~Trade_chunk~Wallet_chunk~d939e436.b93800baf5183aeb9732.js
vendors~OrderBook_chunk~Trade_chunk~Wallet_chunk~d939e436.b93800baf5183aeb9732.js.map
vendors~popper_chunk~6353c401.d9d5405a27bb9ba2a228.js
vendors~popper_chunk~6353c401.d9d5405a27bb9ba2a228.js.map
vendors~Strategies_chunk~Trade_chunk~9df252a8.850b646ad56890f058c2.js
vendors~Strategies_chunk~Trade_chunk~9df252a8.850b646ad56890f058c2.js.map
vendors~Strategies_chunk~Trade_chunk~Wallet_chunk~253ae210.e2416d5440f58be3b9c0.js
vendors~Strategies_chunk~Trade_chunk~Wallet_chunk~253ae210.e2416d5440f58be3b9c0.js.map
vendors~toastify~253ae210.be7d7c84e7133dff5df8.js
vendors~toastify~253ae210.be7d7c84e7133dff5df8.js.map
vendors~WalletComponet_chunk~253ae210.6297dccbbb9413b0d609.js
vendors~WalletComponet_chunk~253ae210.6297dccbbb9413b0d609.js.map
vendors~@walletconnect~253ae210.4e6b9bb357fbb6623c93.js
vendors~@walletconnect~253ae210.4e6b9bb357fbb6623c93.js.map
Wallet_chunk~31ecd969.34401cccb76342334702.js
Wallet_chunk~31ecd969.34401cccb76342334702.js.map
WalletComponet_chunk~f71cff67.eb0e2a811d637f5b7548.js
WalletComponet_chunk~f71cff67.eb0e2a811d637f5b7548.js.map

@ghost
Copy link

ghost commented Jun 10, 2020

Travis automatic deployment:
https://pr1095--dexreact.review.gnosisdev.com

@anxolin
Copy link
Contributor

anxolin commented Jun 10, 2020

I get Qmahxjj1QuRQSd8bJEHSk2AB65W1uiqqyvC9TD2HKm3LZj with v12.13.1 😢

@Velenir
Copy link
Contributor Author

Velenir commented Jun 10, 2020

What about 12.18?

@Velenir
Copy link
Contributor Author

Velenir commented Jun 10, 2020

Which files are different? All of them or main.js?

@alfetopito
Copy link
Contributor

alfetopito commented Jun 10, 2020

QmYmsqvBpQjixkeugyg5FiKDkbxRYjotuWtbXTAGmENRML on node v12.16.3

I had a custom config. Without that, and on node v12.18.0 I get now QmcyAq4hcixRUN7HTKf2jXD37HpHBSoauvPDGygJqGixkh.

Only 1 file difference: https://www.diffchecker.com/Webz1CWq
screenshot_2020-06-10_11-10-05

Actually, dir contents are identical (I had a white space at the end)

@anxolin
Copy link
Contributor

anxolin commented Jun 10, 2020

I did also had a custom config! without it, I've got the same hash as @alfetopito

Used node v12.13.1 and this command:

yarn install --frozen-lockfile && yarn build && ipfs add -rn dist

Edit: @Velenir I've got also QmcyAq4hcixRUN7HTKf2jXD37HpHBSoauvPDGygJqGixkh with v12.18.0, and even with v12.1.0

@Velenir
Copy link
Contributor Author

Velenir commented Jun 11, 2020

I removed everything extra and GOT IT!!
QmcyAq4hcixRUN7HTKf2jXD37HpHBSoauvPDGygJqGixkh

package.json Outdated
@@ -4,6 +4,9 @@
"description": "",
"main": "src/index.js",
"sideEffects": false,
"engines": {
"node": ">=v12.13.0 <13"
Copy link
Contributor

@anxolin anxolin Jun 10, 2020

Choose a reason for hiding this comment

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

Theoretically, we work with other versions of node. The version thing is only relevant for the hash, or does it have any other value to enforce it?
Since node LTS is version 12 now, it might be ok, and even reduce chances of people running into issues

What do you think?

Copy link
Contributor

Choose a reason for hiding this comment

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

In any case, why you enforce v12.13?

If we do enforce, any v12 one would suffice. I've actually tested v12.1 and I get the same hash: #1095 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Only relevant for hash, but it won't allow to run any script, including yarn build on wrong version
I quickly copied from here, but we can just stick to 12, will change

@@ -188,6 +188,7 @@ module.exports = ({ stats = false } = {}) => ({
}),
].filter(Boolean),
optimization: {
moduleIds: 'hashed',
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm fine with this change, although I think it was not affecting.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, doesn't affect, will remove

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wait, it changed for me. Got QmdMLvyxKWSwvsKCLVhS2AgTWn9E91iU37xPJQMmoWRpdc
Try yarn build && ipfs add -rn dist a couple times with moduleIds: 'hashed', commented out

@@ -102,7 +105,7 @@
"eslint-plugin-react-hooks": "^4.0.0",
"eslint-utils": ">=2.0.0",
"favicons-webpack-plugin": "^3.0.1",
"file-loader": "^5.0.2",
"file-loader": "^6.0.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this related somehow?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, I was just updating webpack related stuff and left this in

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also file-loader switched to md4 for caching in v6, which matches webpack default

@Velenir Velenir merged commit d4af5b1 into develop Jun 15, 2020
@Velenir Velenir deleted the stable_hash branch June 15, 2020 07:47
@alfetopito alfetopito mentioned this pull request Jul 16, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants