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

[LS] Allow importing any flow.json contracts using new import syntax #224

Merged
merged 4 commits into from
Oct 26, 2023

Conversation

jribbink
Copy link
Contributor

@jribbink jribbink commented Oct 22, 2023

Closes #222

Description

Previously, when using new import syntax, only contracts referenced in deployments section of flow.json for the emulator network were resolved. This did not account for aliased contracts & if the dev chose not to configure emulator deployments for whatever reason.

This PR changes to behaviour to simply resolve any contract in the contracts section of flow.json from the corresponding source location.


  • Targeted PR against master branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@jribbink jribbink marked this pull request as draft October 22, 2023 23:23
@jribbink jribbink force-pushed the jribbink/fix-importing-aliases branch from 3427f24 to 6135339 Compare October 23, 2023 04:06
@jribbink jribbink force-pushed the jribbink/fix-importing-aliases branch from 6135339 to baca3d4 Compare October 23, 2023 04:18
@jribbink jribbink marked this pull request as ready for review October 23, 2023 04:19
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice, thank you!

languageserver/test/FungibleToken.cdc Outdated Show resolved Hide resolved
@turbolent
Copy link
Member

Please follow and complete the checklist, e.g. add a label to the PR

@jribbink jribbink added Language Server Improvement Technical work without new features, refactoring, improving tests bugfix and removed Improvement Technical work without new features, refactoring, improving tests labels Oct 23, 2023
@jribbink jribbink force-pushed the jribbink/fix-importing-aliases branch from 36ff588 to 9182ac3 Compare October 23, 2023 16:29
@jribbink jribbink requested a review from turbolent October 23, 2023 16:36
@jribbink jribbink changed the title [LS] Allow importing aliased contracts using new import syntax [LS] Allow importing any flow.json contracts using new import syntax Oct 24, 2023
languageserver/integration/flow.go Outdated Show resolved Hide resolved
@turbolent turbolent merged commit 4193db8 into master Oct 26, 2023
7 checks passed
@turbolent turbolent deleted the jribbink/fix-importing-aliases branch October 26, 2023 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[LS] String import resolution does not work with aliases
3 participants