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

fix(bindings/cli): Rename --config to --config-json #6932

Merged
merged 1 commit into from Feb 10, 2023

Conversation

titanous
Copy link
Contributor

Description:

@swc/cli uses a different format for --config, so use a different name.

BREAKING CHANGE:

Experimental --config option has been renamed to --config-json.

Related issue (if exists): #4017 (comment)

@swc/cli uses a different format for --config, so use a different name.
@alexeagle
Copy link
Contributor

I wish it would just be --config and match semantics, but I agree this is an improvement over what's on HEAD right now, and you could add --config back to swcx later such that it matches.

@titanous
Copy link
Contributor Author

Unfortunately for the purposes of rules_swc, the old semantics are unworkable: we need to be able to pass arbitrary plugin configuration, which would require a really annoying flattening routine to spread every part of the config object into separate CLI args and even then it would be lossy without type information.

@Aghassi
Copy link

Aghassi commented Feb 10, 2023

@titanous can you make this non breaking by leaving --config in and emitting a warning for using it and say it will be breaking in the future? Just makes the adoption right now slightly easier.

Although I guess the other was already experimental. It's really unclear to me if the rust binary is considered stable or not from what I can see publicly on the docsite etc.

@titanous
Copy link
Contributor Author

I'd prefer to just rename it quickly given that it was already marked as experimental and this release has only been out for a few days. Otherwise the breakage in the future will be bigger, not everyone reads warnings.

@Aghassi
Copy link

Aghassi commented Feb 10, 2023

Sounds good to me thanks!

Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!


swc-bump:

  • dbg-swc

@kdy1 kdy1 enabled auto-merge (squash) February 10, 2023 18:29
@kdy1 kdy1 added this to the Planned milestone Feb 10, 2023
@kdy1 kdy1 merged commit cb4436b into swc-project:main Feb 10, 2023
@titanous titanous deleted the rename-config-json branch February 10, 2023 18:31
@kdy1 kdy1 modified the milestones: Planned, v1.3.36 Feb 21, 2023
@swc-project swc-project locked as resolved and limited conversation to collaborators Mar 23, 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

4 participants