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

Added validate-exports script to check the consistency of package exports #1269

Conversation

spoenemann
Copy link
Contributor

Fixes #1261.

#1171 and #1258 should be adapted to include additional exports validation and update the exclude paths of main.

"exclude": [
"../src/test/**/*"
]
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's very smart 🎩

I'm just confused by the name and location of the file. What about
tsconfig.src-main.json, tsconfig.src-main-only.json, tsconfig.src-plain.json, tsconfig.src-plain-only.json? (to have it in line with the other tsconfigs).

I would love to see a comment like
// only used for validating to not import modules from 'src/test', ... within base modules like 'src/parser/*'
in line 1 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just confused by the name and location of the file. What about
tsconfig.src-main.json, tsconfig.src-main-only.json, tsconfig.src-plain.json, tsconfig.src-plain-only.json? (to have it in line with the other tsconfigs).

I'd prefer to keep it separate to highlight that this is part of the framework tests and that it's not used for building. Having too many tsconfigs next to each other could be confusing.

I would love to see a comment like `// only used for validating to not import modules from 'src/test', ... within base modules like 'src/parser/*' in line 1 😉

I got an error in the JSON editor when I added a comment (comments are not part of the standard JSON syntax).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's another pro arg for renaming, as tsconfig. ... .json files are handling differently. With such a name comments are permitted, see
image

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, renamed and added a comment. I still think it's better to keep the file in a subfolder to avoid confusion.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@spoenemann spoenemann force-pushed the spoenemann/enforce-isolation-of-1261 branch from 61346d6 to 445cccc Compare November 8, 2023 10:43
@spoenemann spoenemann merged commit 2915ff4 into eclipse-langium:main Nov 8, 2023
4 checks passed
@spoenemann spoenemann deleted the spoenemann/enforce-isolation-of-1261 branch November 8, 2023 12:08
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.

Enforce isolation of package exports
2 participants