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

feat: missing export error #396

Closed
wants to merge 3 commits into from
Closed

feat: missing export error #396

wants to merge 3 commits into from

Conversation

underfin
Copy link
Contributor

@underfin underfin commented Dec 26, 2023

Description

Support give a warning for import/export not matching. Here is an example, the warning message is port from rollup.

[MISSING_EXPORT] Warning: Found missing export.
   ╭─[main.js:1:10]
   │
 1 │ import { value } from "./foo";
   │          ──┬──  
   │            ╰──── "value" is not exported by "foo.js", imported by "main.js".
───╯

Test Plan

Added.


@underfin
Copy link
Contributor Author

underfin commented Dec 26, 2023

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @underfin and the rest of your teammates on Graphite Graphite


#[derive(Debug, Clone, Hash, PartialEq, Eq)]
pub struct SpecifierLiteral {
pub span: Span,
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure if we need add span here and introduce SpecifierLiteral struct here. I'm gonna on hold this PR before I think through it.

Copy link
Member

Choose a reason for hiding this comment

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

Oxc has the same thing https://github.com/oxc-project/oxc/blob/8a3eff1beebc693023e2dfd4035ddcab8cdc739e/crates/oxc_syntax/src/module_record.rs#L75-L79

#[derive(Debug, Clone, PartialEq, Eq)]
pub struct NameSpan {
    name: Atom,
    span: Span,
}

Maybe a rename to NameSpan is all we need here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants