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/prevent absolute imports #975

Merged
merged 2 commits into from
Nov 14, 2022
Merged

Conversation

mefellows
Copy link
Member

This change detects any use of absolute paths such as dsl/message, resulting in a compilation failure.

VS Code (and hopefully other IDEs) will not auto-suggest/import these paths, and provide helpful hints such as the following if they are used:

Screen Shot 2022-11-14 at 10 33 11 pm

See also #974

Some IDEs (such as VS Code) are aware of the `baseUrl'
property, and will auto-complete imports using the base
URL as a prefix in the import, instead of a relative URL.

This creates problems for consumers of the library, as the path
is no longer relative to the top level project base (I think).

Even if this is untrue, it's best to stick with a single,
consistent approach.

As an example, see a20ad80 which had to correct one such
problem.

See also #974
@mefellows
Copy link
Member Author

The Windows build failure is unrelated, it seems the recent "fix" for that did not stick 🤔 .

@mefellows mefellows merged commit c110381 into master Nov 14, 2022
@mefellows mefellows deleted the fix/prevent-absolute-imports branch November 14, 2022 12:05
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.

1 participant