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 implementation of directives. #6052

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Fix implementation of directives. #6052

merged 1 commit into from
Mar 8, 2023

Conversation

cristianoc
Copy link
Collaborator

@cristianoc cristianoc commented Mar 8, 2023

Port of #6052 to master.

The compiler's ppx is only run when parsing the source file. For config settings such as directives, this is OK when bsc is invoked directly, but not when part of building a project. In the latter case, the ast is compiled separately, and the builtin ppx is not run again before emitting code.

@cristianoc
Copy link
Collaborator Author

This is not called from the playground.
The issue is that there's no uniform way to handle per-file configs, and different entry points call different functions.
Will work around this in the next force push.

@cristianoc cristianoc force-pushed the fix_directive branch 2 times, most recently from 1cb8f08 to 5ea49f0 Compare March 8, 2023 16:59
The compiler's ppx is only run when parsing the source file.
For config settings such as directives, this is OK when `bsc` is invoked directly, but not when part of building a project. In the latter case, the ast is compiled separately, and the builtin ppx is not run again before emitting code.
@cristianoc cristianoc merged commit 18d864a into master Mar 8, 2023
@cristianoc cristianoc deleted the fix_directive branch March 8, 2023 17:30
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.

2 participants