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

Consider functions hidden by a signature file as private. #3530

Merged
merged 4 commits into from
Sep 25, 2023

Conversation

nojaf
Copy link
Member

@nojaf nojaf commented Sep 18, 2023

Hi @MangelMaxime, thanks for the pointer in #3528.

I was able to resolve the problem, but I'm unsure about how I can add a proper test for this.
Any thoughts?

@MangelMaxime
Copy link
Member

Hum, it is true that we don't have syntax tests, you can perhaps create one for this one. Like you store in a file somewhere the expected generated file and compare it to the actual generated file.

The other solution feels a lot more hacky to me.

  1. Have a signature file + function definition
  2. Use dynamic import to import the non exported definition
  3. Catch the exception and say that all good this is expected to not be exposed.

@nojaf
Copy link
Member Author

nojaf commented Sep 19, 2023

@MangelMaxime, thanks I made an attempt at having something that asserts expected output.
I'm not that familiar with Expecto, so feel free to point out where things can improve.

@MangelMaxime
Copy link
Member

Thank you @nojaf,

I will have a look at it later this week.

@MangelMaxime MangelMaxime merged commit 390db08 into fable-compiler:main Sep 25, 2023
10 checks passed
@nojaf nojaf mentioned this pull request Feb 25, 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.

2 participants