Skip to content

feat: missing export error#396

Closed
underfin wants to merge 3 commits into
mainfrom
add-missing-export
Closed

feat: missing export error#396
underfin wants to merge 3 commits into
mainfrom
add-missing-export

Conversation

@underfin

@underfin underfin commented Dec 26, 2023

Copy link
Copy Markdown
Contributor

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

underfin commented Dec 26, 2023

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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?

@hyf0 hyf0 added the on-hold label Jan 5, 2024
@underfin underfin force-pushed the main branch 12 times, most recently from 2462fe6 to a00c94c Compare January 17, 2024 06:33
@hyf0 hyf0 closed this in #1238 May 26, 2024
@Brooooooklyn Brooooooklyn deleted the add-missing-export branch January 17, 2025 05:04
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.

3 participants