Skip to content

Conversation

@camc314
Copy link
Contributor

@camc314 camc314 commented Jul 10, 2025

fixes #12134

@camc314 camc314 marked this pull request as ready for review July 10, 2025 14:20
@camc314 camc314 requested a review from Dunqing as a code owner July 10, 2025 14:20
@github-actions github-actions bot added A-semantic Area - Semantic C-enhancement Category - New feature or request labels Jul 10, 2025
Copy link
Contributor Author

camc314 commented Jul 10, 2025


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 10, 2025

CodSpeed Instrumentation Performance Report

Merging #12193 will not alter performance

Comparing c/07-10-feat_semantic_build_semantic_for_.d.ts_files (c995fe2) with main (ab9d91c)

Summary

✅ 34 untouched benchmarks

@camc314 camc314 force-pushed the c/07-10-feat_semantic_build_semantic_for_.d.ts_files branch from 6983d39 to 45a71b3 Compare July 10, 2025 15:02
@Dunqing
Copy link
Member

Dunqing commented Jul 10, 2025

Do you check why there are a lot of .ts files that report errors? It shouldn't only affect .d.ts files?

@camc314
Copy link
Contributor Author

camc314 commented Jul 10, 2025

Do you check why there are a lot of .ts files that report errors? It shouldn't only affect .d.ts files?

I didn't check every one, but checked around half. Alll of those that changed have // @filename: test.d.ts so previously we weren't building semantic for them since they were being interpreted as declaration files.

code where we parse this out:

if meta_name == "filename" {
if let Some(file_name) = current_file_name.take() {
test_unit_data.push(TestUnitData {
name: file_name,
content: std::mem::take(&mut current_file_content),
source_type: SourceType::default(),
});
}
current_file_name = Some(meta_value);
} else {
current_file_options.insert(meta_name, meta_value);
}

@camc314 camc314 force-pushed the c/07-10-feat_semantic_build_semantic_for_.d.ts_files branch from 45a71b3 to 5f056b8 Compare July 10, 2025 20:12
@camc314 camc314 force-pushed the c/07-10-feat_semantic_build_semantic_for_.d.ts_files branch 2 times, most recently from 9115555 to 3a9cdf5 Compare July 14, 2025 13:17
@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Jul 14, 2025
Copy link
Contributor Author

camc314 commented Jul 14, 2025

Merge activity

@graphite-app graphite-app bot force-pushed the c/07-10-feat_semantic_build_semantic_for_.d.ts_files branch from 3a9cdf5 to c995fe2 Compare July 14, 2025 13:27
@graphite-app graphite-app bot merged commit c995fe2 into main Jul 14, 2025
24 checks passed
@graphite-app graphite-app bot deleted the c/07-10-feat_semantic_build_semantic_for_.d.ts_files branch July 14, 2025 13:35
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Jul 14, 2025
graphite-app bot pushed a commit that referenced this pull request Jul 25, 2025
…n<&Program>` (#12515)

#12193 made it so semantic analysis is run on all files (inc. `.d.ts`), so now `AstNodes::program` now always returns `Some`.

We always unwrap the value returned by `AstNodes::program`, so move the `unwrap` into the method itself.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-semantic Area - Semantic C-enhancement Category - New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panics after root node changes

3 participants