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

Refactor CONTRACT_ID injection logic to only occur in LSP mode #7001

Merged
merged 1 commit into from
Mar 7, 2025

Conversation

JoshuaBatty
Copy link
Member

@JoshuaBatty JoshuaBatty commented Mar 7, 2025

Description

This PR modifies CONTRACT_ID injection to only occur in LSP mode, preventing unnecessary dummy values from being added when check() is called outside LSP contexts. Fixes issues with IR test suite where core was incorrectly receiving a CONTRACT_ID definition.

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.

@JoshuaBatty JoshuaBatty requested a review from a team as a code owner March 7, 2025 02:57
@JoshuaBatty JoshuaBatty self-assigned this Mar 7, 2025
@JoshuaBatty JoshuaBatty requested a review from a team March 7, 2025 02:57
@JoshuaBatty JoshuaBatty added the language server LSP server label Mar 7, 2025
Copy link

codspeed-hq bot commented Mar 7, 2025

CodSpeed Performance Report

Merging #7001 will not alter performance

Comparing josh/dummy_contract_id (781ede9) with master (13542d2)

Summary

✅ 22 untouched benchmarks

@kayagokalp kayagokalp requested a review from a team March 7, 2025 04:52
@JoshuaBatty JoshuaBatty enabled auto-merge (squash) March 7, 2025 05:20
Copy link
Contributor

@jjcnn jjcnn left a comment

Choose a reason for hiding this comment

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

Solves the problem I was having. Thanks.

@JoshuaBatty JoshuaBatty merged commit d46f08a into master Mar 7, 2025
42 checks passed
@JoshuaBatty JoshuaBatty deleted the josh/dummy_contract_id branch March 7, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants