-
-
Notifications
You must be signed in to change notification settings - Fork 115
WIP: better linking codegen #2157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: zbarsky/internal
Are you sure you want to change the base?
Conversation
|
65b316c
to
7bf715d
Compare
33445ac
to
0f34833
Compare
e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl
Outdated
Show resolved
Hide resolved
e2e/gyp_no_install_script/snapshots/bzlmod/segfault-handler_defs.bzl
Outdated
Show resolved
Hide resolved
link_packages = { | ||
"": ["segfault-handler"], | ||
}, | ||
link_visibility = ["//visibility:public"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder about things like this as well. Are we constructing both an array and string here 100% of the time?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't some things like this be put into _npm_link_imported_package_store
defaults and then just drop this line? Same with other params maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah i was considering that, it would require a bit more changes to how we instantiate the templates but I agree it would be nice to be able to use better defaults. want me to do it here or a followup?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably a followup?
|
||
deps = {deps} | ||
ref_deps = {ref_deps} | ||
deps = {k.format(link_root_name = link_root_name): v for k, v in deps.items()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would probably be good to avoid .items()
create giant new arrays?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'd love your opinion here. the problem is that link_root_name
is not known at the time these dicts are constructed, only later. is it possible to compute link_root_name
in the module extension and fully materialize these?
alternately, we could defer this expansion until the point where the deps
are actually used, but i wasn't sure if there was a nice single point for that or not.
I figured you know this better, wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my preference would be to fully materialize at extension time if that's possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally it could all be avoided until later.
Is this where dropping the link_root_name
param would help?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok I will try to trace it and see if we can defer, but yeah if we can drop lonk_root_name this becomes a non-issue
Changes are visible to end-users: yes/no
Test plan