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

WIP: Replace python-based JS extraction script with run_shell #589

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

TLATER
Copy link

@TLATER TLATER commented Sep 21, 2021

This is an initial stab at #270 and removes the python dependency in favor of a heavier reliance the
shell.

While not ideal right now, a resolution of bazelbuild/bazel#5511 would allow us to do
the file grepping in starlark

We could use entirely native rules this way, only calling out to the
jar binary directly, which should be included with any jdk, and
therefore result in a rule that is much leaner on dependencies while
also more portable.

Note: This hasn't been tested yet. I've thought a few times I did
using the JS example, but that still builds fine if I remove all relevant
code, so I don't think the modified rule actually ran ;) This is a start,
and an approach, but not a ready patch. I've run out of time for this
for now, so I'm pushing it for future reference.

This also still crucially lacks an implementation for .js.map files,
which is technically trivial, but I'd like to ideally do it without
invoking more shells.

This removes the python dependency in favor of a heavier reliance the
shell.

While not ideal right now, a resolution of
bazelbuild/bazel#5511 would allow us to do
the file grepping in starlark

We could use entirely native rules this way, only calling out to the
`jar` binary directly, which should be included with any jdk, and
therefore result in a rule that is much leaner on dependencies while
also more portable.

Note: This hasn't been tested yet. I've thought a few times I did
using the JS example, but each time it has turned out bazel ended up
using different rules. This is a start, and an approach, but not a
ready patch.

This also still crucially lacks an implementation for .js.map files,
which is technically trivial, but I'd like to ideally do it without
invoking more shells.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants