Skip to content

Deprecate -bs-g bsc-flag #6496

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

Open
ryyppy opened this issue Nov 27, 2023 · 1 comment
Open

Deprecate -bs-g bsc-flag #6496

ryyppy opened this issue Nov 27, 2023 · 1 comment

Comments

@ryyppy
Copy link
Member

ryyppy commented Nov 27, 2023

The bs-g flag has been an experiment for better data structure debugging before ReScript compiled to idiomatic JS data structures.

Since this feature actually caused a bug (#6495) with the newest v11 features, I think it's time to deprecate bs-g to not cause any troubles in the future.

When deprecated, the compiler may yield a warning. Providing the flag should not change any compiler behavior.

@TheSpyder
Copy link
Contributor

There is a bit of discussion in #3716 of other use cases for -bs-g (it sets a DEBUG variable) and wanting an easier way to turn it on. Such as supporting multiple bsconfig.json files, which would also let us do nice things like have compiler warnings in development become errors in CI (I am forced to use sed to do this).

Personally I found -bs-g useful for a BuckleScript "conditional compilation" feature that is so old it only ever worked in ML syntax. I use this for my logging framework; in production it's all zero-cost %identity externals but when debug is on I get extensive console logging. I later extended this file with constants that increase the size of my fast-check property tests in production builds.

There are ways to solve my specific use of -bs-g with -bs-D, it's just a bit more awkward to configure.

@cknitt cknitt added this to the v12 milestone Sep 1, 2024
@cknitt cknitt removed this from the v12 milestone May 5, 2025
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

No branches or pull requests

3 participants