-
Notifications
You must be signed in to change notification settings - Fork 453
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
Support rescript.json
#6193
Support rescript.json
#6193
Conversation
8680c09
to
5a33236
Compare
This reverts commit a012c34.
Quick Q: what's the rationale to rename the concept of config to manifest? |
It doesn't rename config to manifest, it's a separate concept the part dealing with user manifest as data. manifest logic is cheap and can be shared across multiple modules. config logic is heavy and can be derived from manifest and system state. |
Not sure I understand the answer -- but sounds like you've thought about it, so I might ask more later on during review. |
I'm cleaning up the heavy logic of config. It's not pure and hard to compose because it uses a lot of system calls while parsing the configuration simultaneously. I extract the pure part (almost json parsing) from there and give it the name manifest. bsb_config is for bsb, but the manifest can be easily shared by other modules like syntax, gentype, etc. This is not a good time to review because I haven't removed the redundant logic in bsb_config yet. |
What's the status of this? Would love to have this merged so that I can implement support for it in rewatch as well. Furthermore, rescript.json should be an opportunity to clean up the config. Personally, I would remove the following elements:
Also, I would rename the remaining fields that contain "bs":
And the source item has a lot of attributes that are experiments or even don't work at all (e.g. resources, group) |
I think so. also as you mentioned, each field setting has too many variants so I want to clean this up too. The goal of this PR is to support all existing fields for now. Others will be follow-ups. The refactoring to separate config and manifest should make it easier and to use manifest parsing for third-party tools as well. I've taken a break from OSS work in recent months. Will revisit soon, hopefully in this month. |
Ah yes. In fact even the current state of this PR could be split up into multiple.
No 1. should be relatively straightforward? |
Yes, I can make it since I remember the steps for. I'll make a clean PR for it this weekend. |
I've just thought that it would be nice to automatically convert |
Resolves #5278
Introduce a new compiler flag-p
which means "project". The location of therescript.json
(orbsconfig.json
) file allows user to specify the project path where the build/format/etc will start.Don't introduce any new flags. This will be discussed separately if needed.
rescript.json
orbsconfig.json
.rescript.json
precedence overbsconfig.json
.rescript.json
is tried first. Ignoresbsconfig.json
if present.