rescript-lang / rescript-lang/rescript
Make bsb able to compile all third-party artifacts into the top-level lib/
Nobody has claimed this yet.
- Dominant language
- OCaml
- Stars
- 7.5k
- Forks
- 485
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 55
Description
Folks might accidentally use npm link or npm install local/path and have npm symlink the dependency into their own project, either for testing or for whatever other purposes. This is a common scenario and because bsb places artifacts inside these symlinked dirs, some weird behaviors happen.
I think it's reasonable to provide an option to ask bsb to output artifacts outside of the third-party dirs. Maybe in the top-level lib/js folder. Maybe we can pass it as a CLI flag while we're at it so that we don't need to care where to place the artifacts. This allows us to interop with other package managers and workflows better without too much cost.
It'd be a config from the top-level that overrides whatever the third-party bsconfig says.
cc @bsansouci who needed this
Edit: the flag approach might be better, e.g. bsb -artifacts-location foo/bar (is ninja ok with this?). We might need flags soon anyway if we want to have a dev vs prod mode (for e.g. printing debugging?)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bsb's artifact placement and top-level bsconfig handling, then examine how the proposed -artifacts-location CLI flag would interact with Ninja. Done means third-party artifacts can be emitted into a top-level location without writing into symlinked dependency directories, while the top-level configuration overrides third-party settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ocaml
- Domain
- build-system, cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100