build: runtime-deprecate requiring deps#16392
build: runtime-deprecate requiring deps#16392TimothyGu wants to merge 1 commit intonodejs:masterfrom
Conversation
aa42362 to
7ea4135
Compare
|
Isn't this |
bnoordhuis
left a comment
There was a problem hiding this comment.
FWIW, I'd be okay with simple removal. It seems vanishingly unlikely that anyone is using these.
tools/js2c.py
Outdated
tools/js2c.py
Outdated
There was a problem hiding this comment.
This maps deps/foo/bar.js to internal/deps/foo/bar.js.
I don't think you have to special-case for node-inspect or v8 because anything from deps/ should pretty much be internal by default. ISTM it can be simplified to his:
if split[0] === 'deps':
split[0] = 'internal'
else:
split = split[1:]Could be simplified further by just matching on name:
name = '/'.join(re.split('/|\\\\', name))
if name.startswith('lib/'):
name = name[len('lib/'):]
elif name.startswith('deps/'):
deprecated_deps, name = name, 'internal/' + name[len('deps/'):]Bonus points: you won't have to '/'.join(...) below.
There was a problem hiding this comment.
I think I misread the intent of this code - it's prefixing with internal/ unconditionally but stashing the original away. Could still be simplified, though:
name = '/'.join(re.split('/|\\\\', name))
if name.startswith('deps/node-inspect/') or name.startswith('deps/v8/'):
deprecated_deps = name[len('deps/'):]
name = 'internal/' + name
elif name.startswith('lib/'):
name = name[len('lib/'):]There was a problem hiding this comment.
@bnoordhuis Not only that, but internal/ should also be added to any other file in deps/ that do not match node-inspect and v8 to prevent them from being visible to userland, thus the code in its current form.
jasnell
left a comment
There was a problem hiding this comment.
LGTM once @bnoordhuis is happy also.
cjihrig
left a comment
There was a problem hiding this comment.
LGTM once nits are addressed.
jasnell
left a comment
There was a problem hiding this comment.
generally LGTM once @bnoordhuis is happy also
7ea4135 to
122176c
Compare
|
Landed in 0e10717. |
PR-URL: #16392 Fixes: #15566 (comment) Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Fixes: #15566 (comment)
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passesAffected core subsystem(s)
build