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

Revert "eslint(container-runtime): Prefix container-runtime before enabling no-unchecked-record-access" #23499

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

jason-ha
Copy link
Contributor

@jason-ha jason-ha commented Jan 8, 2025

Reverts #23437

  1. Where ? was used to address linter defect, TypeScript appears to mostly ignore that these cases may lead to undefined result which is not accepted per type specifications. Use of ? is thus a behavior change that will shift point of failure away from where it could first be detected - revert those behavior changes. (Many of the test uses of ? in original change are permissible as there is a follow-up assertion that will fail. But those were not separated during revert.)

  2. Where T | undefined was used to address linter defect, TypeScript will narrow without undefined without noUncheckedIndexAccess enabled. Thus, the code appears more confusing as there is a non-respected type annotation.

@github-actions github-actions bot added area: runtime Runtime related issues base: main PRs targeted against main branch labels Jan 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 5 out of 10 changed files in this pull request and generated no comments.

Files not reviewed (5)
  • packages/runtime/container-runtime/src/containerRuntime.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/gc/gcReferenceGraphAlgorithm.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/channelCollection.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/test/gc/gcSummaryStateTracker.spec.ts: Evaluated as low risk
  • packages/runtime/container-runtime/src/gc/garbageCollection.ts: Evaluated as low risk
Comments suppressed due to low confidence (1)

packages/runtime/container-runtime/src/test/channelCollection.spec.ts:118

  • The variable 'nonDataStore1' should retain its type annotation to indicate that it can be undefined, preventing potential runtime errors.
const nonDataStore1 = snapshot.trees[nonDataStorePaths[0]];
Copy link
Collaborator

@msfluid-bot msfluid-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Coverage Summary

No packages impacted by the change.


Baseline commit: 46abe82
Baseline build: 315740
Happy Coding!!

Code coverage comparison check passed!!

@msfluid-bot
Copy link
Collaborator

@fluid-example/bundle-size-tests: +237 Bytes
Metric NameBaseline SizeCompare SizeSize Diff
aqueduct.js 470.55 KB 470.58 KB +33 Bytes
azureClient.js 567.29 KB 567.34 KB +47 Bytes
connectionState.js 724 Bytes 724 Bytes No change
containerRuntime.js 266.44 KB 266.46 KB +12 Bytes
fluidFramework.js 439.08 KB 439.09 KB +14 Bytes
loader.js 134.2 KB 134.21 KB +14 Bytes
map.js 42.68 KB 42.69 KB +7 Bytes
matrix.js 150.36 KB 150.36 KB +7 Bytes
odspClient.js 534.75 KB 534.8 KB +47 Bytes
odspDriver.js 99.49 KB 99.51 KB +21 Bytes
odspPrefetchSnapshot.js 43.05 KB 43.06 KB +14 Bytes
sharedString.js 166.51 KB 166.52 KB +7 Bytes
sharedTree.js 429.55 KB 429.56 KB +7 Bytes
Total Size 3.42 MB 3.42 MB +237 Bytes

Baseline commit: 46abe82

Generated by 🚫 dangerJS against bb168e6

@jason-ha jason-ha merged commit acc9dbf into main Jan 8, 2025
31 checks passed
@jason-ha jason-ha deleted the revert-23437-preFixContainerRuntime branch January 8, 2025 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: runtime Runtime related issues base: main PRs targeted against main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants