Skip to content

Conversation

@wanghuibin0
Copy link

@wanghuibin0 wanghuibin0 commented Dec 31, 2024

I found that sail --ddump-initial-ast dumps nothing instead of the initial ast.
I think this behaviour confuses user so I make this PR to fix it.
This patch simply adds a print statement for --ddump-initial-ast at the beginning of function finalize_ast.

Could you help review this? @Alasdair

@Alasdair
Copy link
Collaborator

Alasdair commented Jan 6, 2025

Well spotted, I suspect that option simply got left after a refactoring to the frontend removed the place it lived. We no longer construct a full AST before type checking each file (now each file has its own per-file AST), so it's not clear if the option even makes sense any more. I think finalize_ast might be a little late for a flag claiming to dump the initial AST though, which originally meant pre-type checking.

@github-actions
Copy link

github-actions bot commented Jan 6, 2025

Test Results

   12 files  ±0     24 suites  ±0   0s ⏱️ ±0s
  738 tests ±0    738 ✅ ±0  0 💤 ±0  0 ❌ ±0 
2 466 runs  ±0  2 465 ✅ ±0  1 💤 ±0  0 ❌ ±0 

Results for commit 66a6f5b. ± Comparison against base commit fd18b93.

@wanghuibin0
Copy link
Author

OK, I see.

@wanghuibin0
Copy link
Author

Does it make sense to remove the --ddump-initial-ast option?

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