Skip to content

Improve errors when loading invalid libraries #6897

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

Conversation

timotheeguerin
Copy link
Member

@timotheeguerin timotheeguerin commented Apr 8, 2025

Target the package.json of the invalid library

Making it easier to find where the issue is
image

Previously we either were tagging nobody if importing an emitter or the import statement.

Library with missing main and exports now report this error

image

Library export point to missing file

fix #2191: Export/main points to invalid file
image

@microsoft-github-policy-service microsoft-github-policy-service bot added the compiler:core Issues for @typespec/compiler label Apr 8, 2025
Copy link
Contributor

github-actions bot commented Apr 8, 2025

All changed packages have been documented.

  • @typespec/compiler
Show changes

@typespec/compiler - fix ✏️

Improve errors when loading libraries with invalid exports/main fields

@azure-sdk
Copy link
Collaborator

azure-sdk commented Apr 8, 2025

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

@timotheeguerin timotheeguerin enabled auto-merge April 8, 2025 23:01
@timotheeguerin timotheeguerin added this pull request to the merge queue Apr 9, 2025
Merged via the queue into microsoft:main with commit a239452 Apr 9, 2025
22 checks passed
@timotheeguerin timotheeguerin deleted the invalid-library-error-improvments branch April 9, 2025 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:core Issues for @typespec/compiler
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invalid package.json main field gives poor error message
3 participants