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

Remove jsx mode #7327

Merged
merged 9 commits into from
Mar 11, 2025
Merged

Remove jsx mode #7327

merged 9 commits into from
Mar 11, 2025

Conversation

nojaf
Copy link
Collaborator

@nojaf nojaf commented Mar 10, 2025

See comment

@nojaf nojaf marked this pull request as ready for review March 10, 2025 20:06
@nojaf nojaf requested review from zth and cknitt March 10, 2025 20:06
Copy link
Collaborator

@zth zth left a comment

Choose a reason for hiding this comment

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

Great job! Maybe @cristianoc would like to eye this one quickly as well?

Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Looks great. Just do double check: -bs-jsx-mode is never use-facing right? Otherwise it could be kept on the command-line and made no-op.
Perhaps rewatch?

Ah yes:

    pub fn get_jsx_mode_args(&self) -> Vec<String> {
        match self.jsx.to_owned() {
            Some(jsx) => match jsx.mode {
                Some(JsxMode::Classic) => {
                    vec!["-bs-jsx-mode".to_string(), "classic".to_string()]
                }
                Some(JsxMode::Automatic) => {
                    vec!["-bs-jsx-mode".to_string(), "automatic".to_string()]
                }

                None => vec![],
            },
            _ => vec![],
        }
    }

@nojaf
Copy link
Collaborator Author

nojaf commented Mar 11, 2025

I didn't change the Rust code here, because I assume we sync it from another place.

@nojaf
Copy link
Collaborator Author

nojaf commented Mar 11, 2025

Looks great. Just do double check: -bs-jsx-mode is never use-facing right? Otherwise it could be kept on the command-line and made no-op.

-bs-jsx-mode is only a flag in bsc. So, I'm not sure if that is public or not.
Do I need to take any actions here?

@zth
Copy link
Collaborator

zth commented Mar 11, 2025

Looks great. Just do double check: -bs-jsx-mode is never use-facing right? Otherwise it could be kept on the command-line and made no-op.

-bs-jsx-mode is only a flag in bsc. So, I'm not sure if that is public or not. Do I need to take any actions here?

Rewatch adds it when it runs bsc, so an easy way to make that cross-compatible is to just add back the -bs-jsx-mode arg (so the CLI doesn't crash when it's passed) but make it noop. So if you could do that, it'd be great and give a smoother experience.

@nojaf nojaf requested a review from cristianoc March 11, 2025 11:13
Copy link
Collaborator

@cristianoc cristianoc left a comment

Choose a reason for hiding this comment

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

Looks great!

Copy link
Member

@cknitt cknitt left a comment

Choose a reason for hiding this comment

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

Great work! 👍

@nojaf nojaf merged commit dfd941e into rescript-lang:master Mar 11, 2025
20 checks passed
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.

4 participants