Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); Upgrading dependencies to use static-eval 2 as well as some other newer modules by archmoj · Pull Request #3267 · plotly/plotly.js · GitHub
Skip to content

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

Closed
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep
Closed

Upgrading dependencies to use static-eval 2 as well as some other newer modules#3267
archmoj wants to merge 11 commits into
masterfrom
upgrade-dep

Conversation

@archmoj

@archmojarchmoj commented Nov 19, 2018

Copy link
Copy Markdown
Contributor

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

Comment threadpackage.json Outdated
"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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown
ContributorAuthor

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
Copy Markdown
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 ⬇️

Details 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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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

@etpinard

Copy link
Copy Markdown
Contributor

Can you explain why cwise needs acorn now?

@archmoj

Copy link
Copy Markdown
ContributorAuthor

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

@archmojarchmoj 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 modulesNov 21, 2018
@etpinard

Copy link
Copy Markdown
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

etpinard commented Nov 21, 2018

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
ContributorAuthor

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
Copy Markdown

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

@etpinard

Copy link
Copy Markdown
Contributor

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

@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 freeto 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

@archmoj@etpinard@e-shaw