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

Move rescript/tools to OCaml #855

Merged
merged 17 commits into from
Jan 12, 2024
Merged

Conversation

aspeddro
Copy link
Contributor

@aspeddro aspeddro commented Nov 26, 2023

  • Move rescript/tools to OCaml Code, tools/src/Cli.res to tools/bin/main.ml
  • Now analysis is a library consumed by tools. The rescript-editor-analysis binary is still built, see analysis/bin/main.ml

Ideally, we should divide packages by platform (rescript-lang/rescript#6183), but this change seeks to reduce node bin wrapper

Everything works as a monorepo:

  • dune build compile analysis and tools. analysis is a dep of tools.
  • The switch is created in the root, there is no need to enter the analysis directory

I think this improves the development experience.

@woeps
Copy link
Contributor

woeps commented Jan 10, 2024

I really like this approach. (Haven't tried this branch.)
I recently set up this repo for local development and experimentation (especially with the tools package). I ended up symlinking the analysis binary into the tools directory and npm linking the tools package to use it.
Nothing dramatic, but it took me some time digging through github actions definitions to figure out, what was needed.

These changes would have removed lots of friction for me, getting started. 👍

@aspeddro
Copy link
Contributor Author

Good to know @woeps. Another point this brings is to decouple tools from analysis because in the future we want to move docgen to the compiler.

The situation is that with each new resource, the transition in the future becomes more difficult.

@aspeddro
Copy link
Contributor Author

@zth If you are interested I can resolve the conflicts

@zth
Copy link
Collaborator

zth commented Jan 10, 2024

@aspeddro let's do it!

@zth
Copy link
Collaborator

zth commented Jan 11, 2024

@aspeddro sorry, another merge needed... 😬

I tried the branch and it seems to work! I wasn't able to get ocamlformat working though (but I didn't try that much, just noticed it's broken for me). Do you have it working?

@aspeddro
Copy link
Contributor Author

I removed ocamlformat dep bff2928. Don´t make sense since we don't run format check on CI.

You should install on switch opam install ocamlformat

CONTRIBUTING.md updated 546b7ca

@zth zth merged commit 3f86b18 into rescript-lang:master Jan 12, 2024
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.

3 participants