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

feat(bindings/cli): Add --plugin and --cache-root #6811

Closed
wants to merge 1 commit into from

Conversation

titanous
Copy link
Contributor

@titanous titanous commented Jan 14, 2023

Description:

  • Add --plugin CLI option that takes a plugin/path={"config":"object"} formatted argument and adds the plugin to the jsc.experimental.plugins list (can be used multiple times). If the plugin path is explicitly relative (starts with ./ or ../), then it is converted to an absolute path using the current working directory as the base.
  • Add a --cache-root CLI option that sets jsc.experimental.cacheRoot

This is an alternative to #6800 that works better for rules_swc and is more straightforward.

Related issue (if exists): aspect-build/rules_swc#149

@kwonoj
Copy link
Member

kwonoj commented Jan 15, 2023

Techinically, if swcx supports --config, specifying these can be done via --config, is it correct?

@titanous
Copy link
Contributor Author

There's a field for --config but I don't see any code implementing it.

@kwonoj
Copy link
Member

kwonoj commented Jan 16, 2023

Yes, it is not implemented. My question is should we implement --config instead, by partially supporting plugin first instead of having new top level args.

@titanous
Copy link
Contributor Author

@kdy1 What do you think about implementing --config vs the approach in this PR?

@kwonoj
Copy link
Member

kwonoj commented Jan 18, 2023

We'll need / have --config anyway, matter of time though. If we add top-level --plugin then once we have --config, what should happen? allow duplicate? or breaking changes to remove duplicated one?

@titanous
Copy link
Contributor Author

It's easy enough to just append if both flags are used. I can implement --config if that's preferred, I just want to get approval for the path forward before doing more work.

@kdy1
Copy link
Member

kdy1 commented Jan 19, 2023

In this regard, I would like to follow @kwonoj 's opinion.

@titanous
Copy link
Contributor Author

titanous commented Jan 19, 2023

Superseded by #6835.

@titanous titanous closed this Jan 19, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Feb 18, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants