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: inline submodule imports resolving incorrectly #66

Merged
merged 6 commits into from
Aug 30, 2024

Conversation

cwkang1998
Copy link
Contributor

@cwkang1998 cwkang1998 commented Aug 27, 2024

In cairo, a file is considered a module. Resolving file modules are pretty simple as they are usually tied to a single file. However, when attempting to resolve submodules with the resolver, specifically those that are inline submodules, the resolver fails to link the imports with the correct files. This causes a few issues:

  • Unable to properly resolve super imports
  • Inability to resolve anything residing in inline submodules of a file

Most issues comes down to the lack of context during the resolving stage.

This PR attempts to fix that by adding more context on the resolving stage for both the use statements and also for each file modules by adding inline submodule information.

Closes #11

Fixed the resolution issue resulting from resolver not being able to
find the imports.

However there's still issues with scarb build failing due to poor
reconstruction of the project.
@cwkang1998 cwkang1998 merged commit 707dd47 into main Aug 30, 2024
4 checks passed
@cwkang1998 cwkang1998 deleted the fix/super-imports branch August 30, 2024 10:43
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.

use with super
1 participant