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

When trying to resolve a non-existent symbol resolver returns _kind='css' and symbol is undefined #258

Closed
tempit opened this issue Jan 25, 2018 · 1 comment · Fixed by #2912
Labels
API Programmatic API core Processing and transforming logic next-major Issues or PR related to the next major version

Comments

@tempit
Copy link
Contributor

tempit commented Jan 25, 2018

:import{
    -st-from: "./import.st.css";
    -st-named: shlomo;
}

In this case, import.st.css has no shlomo. When calling resolver.resolve for shlomo, we get a result with _kind='css', but symbol is undefined.

Buggy code is at:

return { _kind: 'css', symbol, meta } as CSSResolve;

Should check if symbol exists, and set _kind to 'invalid' or 'unknown' otherwise.

@tomrav tomrav added API Programmatic API core Processing and transforming logic labels May 29, 2018
@tomrav tomrav added the next-major Issues or PR related to the next major version label May 3, 2021
@idoros
Copy link
Collaborator

idoros commented Mar 27, 2022

Discussed and the issue is mostly a type issue, where the symbol should be optional or symbol of _kind: undefined.

@idoros idoros mentioned this issue Mar 27, 2022
18 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Programmatic API core Processing and transforming logic next-major Issues or PR related to the next major version
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants