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 problem with Program::parse() #1522

Merged
merged 1 commit into from
Aug 10, 2023
Merged

Fix problem with Program::parse() #1522

merged 1 commit into from
Aug 10, 2023

Conversation

Radvendii
Copy link
Member

Program::parse() was calling ImportResolver::get() which assumed that as an ImportResolver, we can only get terms when all the imports are resolved, so it had a debug_assert!() to ensure this. In this case, we are only parsing the file and returning its AST, so we can get the terms field of the Cache and call get() on that.

We had discussed a much more complicated solution that essentially amounted to this, plus a refactor of how ImportResolver works. But as I was implementing it started seeming less like a good idea, and also I realized not necessary to solve this problem. We can revisit that refactor, but for now this solves the problem.

@github-actions github-actions bot temporarily deployed to pull request August 10, 2023 14:30 Inactive
@Radvendii Radvendii added this pull request to the merge queue Aug 10, 2023
Merged via the queue into master with commit 701b7ed Aug 10, 2023
4 checks passed
@Radvendii Radvendii deleted the fix-program-parse branch August 10, 2023 15:55
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.

2 participants