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

Fix cyclic dependencies core <-> frontend #5915

Merged
merged 1 commit into from
Dec 26, 2022

Conversation

cknitt
Copy link
Member

@cknitt cknitt commented Dec 26, 2022

This resolves some cyclic dependencies between jscomp/core and jscomp/frontend, thereby also fixing editor integration for the files in jscomp/frontend.

  • frontend can now be compiled as a separate lib instead of copying the frontend .ml(i) files to the core directory.
  • The dependency is now unidirectional (core depends on frontend)

To achieve this, I did the following:

  • Move js_raw_info.ml and lam_constant.ml(i) from core to frontend
  • Adapt a few type definitions

This was the quickest and least invasive way I found to resolve the issue. If any further restructuring is wanted, it can be done in future PRs.

Fixes #5877.

@cknitt cknitt requested a review from cristianoc December 26, 2022 08:14
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.

Sweet! No more coding without editor support there.
Should formatting also be turned back on.

@cknitt
Copy link
Member Author

cknitt commented Dec 26, 2022

We can do a separate PR for formatting.

@cknitt cknitt merged commit d241c92 into rescript-lang:master Dec 26, 2022
@cknitt cknitt deleted the fix-cyclic-dependencies branch December 26, 2022 10:56
@mununki
Copy link
Member

mununki commented Dec 26, 2022

Thanks! 👍

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.

Cyclic dependency core <-> frontend
3 participants