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

Upgrading dependencies to use static-eval 2 as well as some other newer modules #3267

Closed
wants to merge 11 commits into from

Conversation

archmoj
Copy link
Contributor

@archmoj archmoj commented Nov 19, 2018

This PR tested various module patches on the CI i.e. to possibly upgrade the rest to static-eval version 2.
Some gl-vis modules are also patched to use newer & identical modules e.g. glslify 6.3.1, ndarray 1.0.18 & gl-axes 1.4.0 and tested with CI so that the number of development vulnerabilities could be reduced.
@etpinard
@alexcjohnson
@bpostlethwaite

package.json Outdated
@@ -95,8 +95,8 @@
"mouse-event-offset": "^3.0.2",
"mouse-wheel": "^1.0.2",
"ndarray": "^1.0.18",
"ndarray-fill": "^1.0.2",
"ndarray-homography": "^1.0.0",
"ndarray-fill": "git://github.com/archmoj/ndarray-fill.git#d61a638a550c83f4fc2add00de34b2848bd5ce9b",
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. I don't understand. Don't we need to patch cwise:

image

see scijs/cwise#19

Copy link
Contributor

Choose a reason for hiding this comment

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

Ha, here it is: scijs/cwise@master...archmoj:upgrade-dep

I'll see if I can get you commits rights in the scijs org.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Are the cwise tests passing under your patch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

And you are right. I need to update those pointing to cwise in the package too.

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 they are updated:

plotly.js@1.42.5 /home/mojtaba/plotly/webgl/plotly.js
├─┬ gl-plot2d@1.4.0 (git://github.com/gl-vis/gl-plot2d.git#b443a56bd6d8b76ff01ae4d2791da27661ac010f)
│ └─┬ gl-select-static@2.0.2 (git://github.com/gl-vis/gl-select-static.git#c1a20bcb01ce45da99de17eb21b827f4d8b1d060)
│   └── cwise@1.0.10  (git://github.com/archmoj/cwise.git#03dcf53e91ebdeb1df0f62263871b9fd42510c71)
├─┬ gl-plot3d@1.6.0 (git://github.com/gl-vis/gl-plot3d.git#02991fd4b8a57047e245cddd2577efcf7440c7d7)
│ └─┬ gl-select-static@2.0.2 (git://github.com/gl-vis/gl-select-static.git#c1a20bcb01ce45da99de17eb21b827f4d8b1d060)
│   └── cwise@1.0.10  (git://github.com/archmoj/cwise.git#03dcf53e91ebdeb1df0f62263871b9fd42510c71)
├─┬ ndarray-fill@1.0.2 (git://github.com/archmoj/ndarray-fill.git#d61a638a550c83f4fc2add00de34b2848bd5ce9b)
│ └── cwise@1.0.10  (git://github.com/archmoj/cwise.git#03dcf53e91ebdeb1df0f62263871b9fd42510c71)
└─┬ ndarray-homography@1.0.0 (git://github.com/archmoj/ndarray-homography.git#423590db51cba0d30eaa5b6f34b4b3f27a53d3f8)
  └─┬ ndarray-warp@1.0.0 (git://github.com/archmoj/ndarray-warp.git#b72a3dc32101e6f22505dc2cbbcaec67b1e88a69)
    └── cwise@1.0.10  (git://github.com/archmoj/cwise.git#03dcf53e91ebdeb1df0f62263871b9fd42510c71)

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. The cwise tests are failing off your branch. See logs ⬇️

18:51 $ npm test

cwise@1.0.10 pretest /home/etienne/Documents/plotly/cwise
rm -f node_modules/cwise && ln -s .. node_modules/cwise

cwise@1.0.10 test /home/etienne/Documents/plotly/cwise
tape test/*.js

TAP version 13

only allow same shape

ok 1 should not throw
ok 2 should not throw
ok 3 should not throw
ok 4 should not throw
ok 5 should not throw
ok 6 should not throw
ok 7 should throw
ok 8 should throw
ok 9 should throw
ok 10 should throw
ok 11 should throw
ok 12 should throw
ok 13 should throw
ok 14 should throw
ok 15 should throw
ok 16 should throw

binary

ok 17 length==0; shape
ok 18 length==0
ok 19 length==1; shape
ok 20 length==1
ok 21 A, B; shape
ok 22 A, B
ok 23 A.lo(32), B.hi(128-32); shape
ok 24 A.lo(32), B.hi(128-32)
ok 25 A.step(-1), B; shape
ok 26 A.step(-1), B
ok 27 A, B.step(-1); shape
ok 28 A, B.step(-1)
ok 29 DS; length==0; shape
ok 30 DS; length==0
ok 31 DS; length==0; shape
ok 32 DS; length==0
ok 33 DS; A, B; shape
ok 34 DS; A, B
ok 35 DS; A.lo(32), B.hi(128-32); shape
ok 36 DS; A.lo(32), B.hi(128-32)
ok 37 DS; A.step(-1), B; shape
ok 38 DS; A.step(-1), B
ok 39 DS; A, B.step(-1); shape
ok 40 DS; A, B.step(-1)
ok 41 X, Y; shape[0]
ok 42 X, Y; shape[1]
ok 43 X, Y
ok 44 X.T, Y.T; shape[0]
ok 45 X.T, Y.T; shape[1]
ok 46 X.T, Y.T
ok 47 X.T, Y; shape[0]
ok 48 X.T, Y; shape[1]
ok 49 X.T, Y
ok 50 X, Y.T; shape[0]
ok 51 X, Y.T; shape[1]
ok 52 X, Y.T
ok 53 X.hi(32,32), Y.hi(32,32); shape[0]
ok 54 X.hi(32,32), Y.hi(32,32); shape[1]
ok 55 X.hi(32,32), Y.hi(32,32)
ok 56 X.hi(31,31), Y.hi(31,31); shape[0]
ok 57 X.hi(31,31), Y.hi(31,31); shape[1]
ok 58 X.hi(31,31), Y.hi(31,31)
ok 59 X.hi(0,32), Y.hi(0,32); shape[0]
ok 60 X.hi(0,32), Y.hi(0,32); shape[1]
ok 61 X.hi(0,32), Y.hi(0,32)
ok 62 X.T.hi(0,32), Y.hi(0,32); shape[0]
ok 63 X.T.hi(0,32), Y.hi(0,32); shape[1]
ok 64 X.T.hi(0,32), Y.hi(0,32)
ok 65 X.T.hi(33,33), Y.hi(33,33); shape[0]
ok 66 X.T.hi(33,33), Y.hi(33,33); shape[1]
ok 67 X.T.hi(33,33), Y.hi(33,33)
ok 68 X.T.hi(31,31), Y.hi(31,31); shape[0]
ok 69 X.T.hi(31,31), Y.hi(31,31); shape[1]
ok 70 X.T.hi(31,31), Y.hi(31,31)

unary

unary

ok 71 simple_zeros.hi(0)
ok 72 simple_zeros.hi(1)
ok 73 simple_zeros.hi(2)
ok 74 simple_zeros
ok 75 simple_zeros.hi(31)
ok 76 simple_zeros.hi(32)
ok 77 simple_zeros.hi(33)
ok 78 simple_zeros.step(-1)
ok 79 simple_zeros.step(3)
ok 80 simple_zeros.step(4)
ok 81 simple_zeros.step(5).lo(10)
ok 82 custom_zeros.hi(0)
ok 83 custom_zeros.hi(1)
ok 84 custom_zeros.hi(2)
ok 85 custom_zeros
ok 86 custom_zeros.hi(31)
ok 87 custom_zeros.hi(32)
ok 88 custom_zeros.hi(33)
ok 89 custom_zeros.step(-1)
ok 90 custom_zeros.step(3)
ok 91 custom_zeros.step(4)
ok 92 custom_zeros.step(5).lo(10)
ok 93 M
ok 94 M.hi(10, 10)
ok 95 M.lo(100,1)
ok 96 M.transpose(1,0)
ok 97 M.step(-1, 1)
ok 98 M.step(-5, -2)
ok 99 M.step(16, 3)
ok 100 DS; M
ok 101 DS; M.hi(10, 10)
ok 102 DS; M.lo(100,1)
ok 103 DS; M.transpose(1,0)
ok 104 DS; M.step(-1, 1)
ok 105 DS; M.step(-5, -2)
ok 106 DS; M.step(16, 3)

binary

binary

ok 107 length==0; shape
ok 108 length==0
ok 109 length==1; shape
ok 110 length==1
ok 111 A, B; shape
ok 112 A, B
ok 113 A.lo(32), B.hi(128-32); shape
ok 114 A.lo(32), B.hi(128-32)
ok 115 A.step(-1), B; shape
ok 116 A.step(-1), B
ok 117 A, B.step(-1); shape
ok 118 A, B.step(-1)
ok 119 DS; length==0; shape
ok 120 DS; length==0
ok 121 DS; length==0; shape
ok 122 DS; length==0
ok 123 DS; A, B; shape
ok 124 DS; A, B
ok 125 DS; A.lo(32), B.hi(128-32); shape
ok 126 DS; A.lo(32), B.hi(128-32)
ok 127 DS; A.step(-1), B; shape
ok 128 DS; A.step(-1), B
ok 129 DS; A, B.step(-1); shape
ok 130 DS; A, B.step(-1)
ok 131 X, Y; shape[0]
ok 132 X, Y; shape[1]
ok 133 X, Y
ok 134 X.T, Y.T; shape[0]
ok 135 X.T, Y.T; shape[1]
ok 136 X.T, Y.T
ok 137 X.T, Y; shape[0]
ok 138 X.T, Y; shape[1]
ok 139 X.T, Y
ok 140 X, Y.T; shape[0]
ok 141 X, Y.T; shape[1]
ok 142 X, Y.T
ok 143 X.hi(32,32), Y.hi(32,32); shape[0]
ok 144 X.hi(32,32), Y.hi(32,32); shape[1]
ok 145 X.hi(32,32), Y.hi(32,32)
ok 146 X.hi(31,31), Y.hi(31,31); shape[0]
ok 147 X.hi(31,31), Y.hi(31,31); shape[1]
ok 148 X.hi(31,31), Y.hi(31,31)
ok 149 X.hi(0,32), Y.hi(0,32); shape[0]
ok 150 X.hi(0,32), Y.hi(0,32); shape[1]
ok 151 X.hi(0,32), Y.hi(0,32)
ok 152 X.T.hi(0,32), Y.hi(0,32); shape[0]
ok 153 X.T.hi(0,32), Y.hi(0,32); shape[1]
ok 154 X.T.hi(0,32), Y.hi(0,32)
ok 155 X.T.hi(33,33), Y.hi(33,33); shape[0]
ok 156 X.T.hi(33,33), Y.hi(33,33); shape[1]
ok 157 X.T.hi(33,33), Y.hi(33,33)
ok 158 X.T.hi(31,31), Y.hi(31,31); shape[0]
ok 159 X.T.hi(31,31), Y.hi(31,31); shape[1]
ok 160 X.T.hi(31,31), Y.hi(31,31)

offset

offset

ok 161 length==0; shape
ok 162 length==0
ok 163 length==1; shape
ok 164 length==1
ok 165 A, B; shape
ok 166 A, B
ok 167 A.lo(32), B.lo(32); shape
ok 168 A.lo(32), B.lo(32)
ok 169 A.step(-1), B; shape
ok 170 A.step(-1), B
ok 171 A, B.step(-1); shape
ok 172 A, B.step(-1)
ok 173 DS; length==0; shape
ok 174 DS; length==0
ok 175 DS; length==1; shape
ok 176 DS; length==1
ok 177 DS; A, B; shape
ok 178 DS; A, B
ok 179 DS; A.lo(32), B.lo(32); shape
ok 180 DS; A.lo(32), B.lo(32)
ok 181 DS; A.step(-1), B; shape
ok 182 DS; A.step(-1), B
ok 183 DS; A, B.step(-1); shape
ok 184 DS; A, B.step(-1)

fill

fill

undefined:10
a0[p0] = Y0.apply(_inline_1_undefined, index)
^

ReferenceError: _inline_1_undefined is not defined
at body_cwise_loop_1s0m2f32 (eval at generateCWiseOp (evalmachine.:506:11), :10:25)
at body_cwise_thunk (eval at createThunk (evalmachine.:593:15), :7:53)
at Test. (evalmachine.:5031:3)
at Test.bound [as _cb] (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:76:32)
at Test.run (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:95:10)
at Test.bound [as run] (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:76:32)
at Test._end (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:164:11)
at Test.bound [as _end] (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:76:32)
at Test.end (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:156:10)
at Test.bound [as end] (/home/etienne/Documents/plotly/cwise/node_modules/tape/lib/test.js:76:32)
npm ERR! Test failed. See above for more details.

@etpinard
Copy link
Contributor

Ok great. I tried doing just that back in June, but things didn't work out.

Not sure what's different in your attempt.

@archmoj
Copy link
Contributor Author

archmoj commented Nov 20, 2018

@etpinard Please have a look at the changes cwise and ndarray-fill

@etpinard
Copy link
Contributor

Can you explain why cwise needs acorn now?

@archmoj
Copy link
Contributor Author

archmoj commented Nov 20, 2018

Very good question. It is requested by acorn-dynamic-import@4.0.0. But yes as you explained we could remove that from dependencies.

@archmoj archmoj changed the title Upgrading dependencies to use static-eval 2.0.0 Upgrading dependencies to use static-eval 2 as well as some other newer modules Nov 21, 2018
@etpinard
Copy link
Contributor

OK we could start to make PR to those modules?

Let's start by making a PR to cwise, we'll wait a few days in case other maintainers have concerns.

@etpinard
Copy link
Contributor

etpinard commented Nov 21, 2018

Looking at your links, enable-mobile and gl-texture2d-pip are not part of the plotly.js dependencies. Why did we need to update them?

@etpinard
Copy link
Contributor

By the way, thanks a million for doing this!

Upgrading deps, deps of deps, and deps of deps of deps can be very painful. 💪

@archmoj
Copy link
Contributor Author

archmoj commented Nov 21, 2018

You are right enable-mobile and gl-texture2d-pip are not part of the plotly.js dependencies.
It looks they were among the dev dependencies of some of the gl-vis modules (for instance gl-plot3d has enable-mobile). And just because of that the alarm messages show up using npm i as well as on github repos.

@e-shaw
Copy link

e-shaw commented Jan 8, 2019

Is there an eta on when this can be expected to be merged?

@etpinard
Copy link
Contributor

Closing this PR until browserify/static-module#48 (comment) is addressed.

@etpinard etpinard closed this Jan 15, 2019
@etpinard etpinard deleted the upgrade-dep branch January 15, 2019 21:45
@archmoj archmoj restored the upgrade-dep branch April 15, 2020 20:16
@archmoj archmoj deleted the upgrade-dep branch April 15, 2020 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants