Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: re-order fields in JsInfo for readability #1648

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

gregmagolan
Copy link
Member

@gregmagolan gregmagolan commented Apr 14, 2024

No description provided.

@gregmagolan gregmagolan force-pushed the rjs2_target_bin_dir_js_info branch from 35f5de8 to 2033e65 Compare April 14, 2024 06:12
js/private/js_info.bzl Outdated Show resolved Hide resolved
@jbedard
Copy link
Member

jbedard commented Apr 14, 2024

Why are these being added? What will they be used for?

@gregmagolan
Copy link
Member Author

Why are these being added? What will they be used for?

Read the summary

@jbedard
Copy link
Member

jbedard commented Apr 14, 2024

I know it's for #1646 and have looked at the code there as well, I was still hoping for more of an understanding of it though. There's no point merging this without understanding it first 🤷

@gregmagolan gregmagolan requested a review from jbedard April 14, 2024 16:54
@gregmagolan
Copy link
Member Author

gregmagolan commented Apr 14, 2024

I know it's for #1646 and have looked at the code there as well, I was still hoping for more of an understanding of it though. There's no point merging this without understanding it first 🤷

The code in #1646 is fairly easy to follow to find the use case. TL;DR is that in #1646 we're linking to a directory in the output tree so there is no File to get the path to that from. Instead we use a combination of the JsInfo bin_dir.path and the target.package to determine the directory path in the output tree to symlink to.

@jbedard
Copy link
Member

jbedard commented Apr 14, 2024

I would vote to only add these fields once we need them and they are actually used, so in the main PR. Want to change this PR just to do the re-ordering and fail cleanup?

@gregmagolan gregmagolan force-pushed the rjs2_target_bin_dir_js_info branch from 2033e65 to f166afa Compare April 15, 2024 14:54
@gregmagolan gregmagolan changed the title refactor: add mandatory target & bin_dir fields to JsInfo provider refactor: re-order fields in JsInfo for readability Apr 15, 2024
@gregmagolan
Copy link
Member Author

I would vote to only add these fields once we need them and they are actually used, so in the main PR. Want to change this PR just to do the re-ordering and fail cleanup?

Sure. Updated.

@gregmagolan gregmagolan merged commit d512ac9 into 2.x Apr 15, 2024
99 checks passed
@gregmagolan gregmagolan deleted the rjs2_target_bin_dir_js_info branch April 15, 2024 16:15
@gregmagolan gregmagolan mentioned this pull request Apr 29, 2024
21 tasks
jbedard pushed a commit to jbedard/rules_js that referenced this pull request May 14, 2024
jbedard pushed a commit to jbedard/rules_js that referenced this pull request May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants