Skip to content

Keep track of interface surface status for entries in trait map. #7210

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

Merged
merged 4 commits into from
Jun 11, 2025

Conversation

tritao
Copy link
Contributor

@tritao tritao commented Jun 1, 2025

Description

This adds bookkeeping information to the trait map so we can avoid emitting diagnostics for interface surface trait impls .

What happens is that during type checking, we first check the interface surface as a first pass, and only then do a second pass for the whole implementation, and this causes some issues with emitting diagnostics that should not be emitted.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

@tritao tritao self-assigned this Jun 1, 2025
@tritao tritao added the compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen label Jun 1, 2025
@tritao tritao temporarily deployed to fuel-sway-bot June 1, 2025 18:26 — with GitHub Actions Inactive
Copy link

codspeed-hq bot commented Jun 1, 2025

CodSpeed Performance Report

Merging #7210 will not alter performance

Comparing tritao:trait-map-track-interface-surface (1780174) with master (14dc752)

Summary

✅ 24 untouched benchmarks

@tritao tritao force-pushed the trait-map-track-interface-surface branch from 6389474 to 71781e7 Compare June 2, 2025 08:47
@tritao tritao temporarily deployed to fuel-sway-bot June 2, 2025 08:47 — with GitHub Actions Inactive
@tritao tritao marked this pull request as ready for review June 2, 2025 09:39
@tritao tritao requested a review from a team as a code owner June 2, 2025 09:39
IGI-111
IGI-111 previously approved these changes Jun 2, 2025
Copy link
Contributor

@IGI-111 IGI-111 left a comment

Choose a reason for hiding this comment

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

LGTM but ideally we should add a Rust test for this to make sure we don't reintroduce the behavior.

@tritao tritao force-pushed the trait-map-track-interface-surface branch from 8f8d0db to ecc7a9d Compare June 3, 2025 17:24
@tritao tritao temporarily deployed to fuel-sway-bot June 3, 2025 17:24 — with GitHub Actions Inactive
@tritao
Copy link
Contributor Author

tritao commented Jun 3, 2025

LGTM but ideally we should add a Rust test for this to make sure we don't reintroduce the behavior.

I've added an assert now.

@tritao tritao enabled auto-merge (squash) June 3, 2025 18:04
@tritao tritao temporarily deployed to fuel-sway-bot June 3, 2025 18:04 — with GitHub Actions Inactive
@tritao tritao requested a review from IGI-111 June 3, 2025 18:04
@tritao tritao force-pushed the trait-map-track-interface-surface branch from 149b5c4 to dd7664d Compare June 4, 2025 21:33
@tritao tritao temporarily deployed to fuel-sway-bot June 4, 2025 21:33 — with GitHub Actions Inactive
@tritao tritao requested a review from JoshuaBatty June 6, 2025 14:17
@tritao tritao merged commit 0e24afd into FuelLabs:master Jun 11, 2025
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants