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

Refactoring in preparation for normalized qualified names #11927

Merged
merged 3 commits into from
Jan 2, 2025

Conversation

kazcw
Copy link
Contributor

@kazcw kazcw commented Dec 19, 2024

Pull Request Description

Part of #11815: Some refactoring before introducing any behavior changes.

  • SuggestionUpdateProcessor will simplify adding more contextual information to the update application process.
  • Mock suggestion data is constructed using lsUpdate so that the mocking logic doesn't have to be kept consistent with the lsUpdate implementation.
  • When uploading, use ExternalId to identify function; it's simpler than comparing stack items.
  • Correct some language server definitions that can be null in practice.
  • Add a test covering current behavior wrt. Renaming a project causes collapsed function added by Component Browser to stop working #11815; following PR will update expected results.

Important Notes

Checklist

Please ensure that the following checklist has been satisfied before submitting the PR:

  • The documentation has been updated, if necessary.
  • Screenshots/screencasts have been attached, if there are any visual changes. For interactive or animated visual changes, a screencast is preferred.
  • All code follows the
    Scala,
    Java,
    TypeScript,
    and
    Rust
    style guides. In case you are using a language not listed above, follow the Rust style guide.
  • Unit tests have been written where possible.
  • If meaningful changes were made to logic or tests affecting Enso Cloud integration in the libraries,
    or the Snowflake database integration, a run of the Extra Tests has been scheduled.
    • If applicable, it is suggested to paste a link to a successful run of the Extra Tests.

- `SuggestionUpdateProcessor` will simplify adding more contextual information
  to the update application process.
- Mock suggestion data is constructed using `lsUpdate` so that the mocking
  logic doesn't have to be kept consistent with the `lsUpdate` implementation.
- When uploading, use `ExternalId` to identify function; it's simpler than
  comparing stack items.
- Correct some language server definitions that can be `null` in practice.
- Add a test covering *current* behavior wrt. #11815; following PR will update
  expected results.
@kazcw kazcw added the CI: No changelog needed Do not require a changelog entry for this PR. label Dec 19, 2024
@kazcw kazcw self-assigned this Dec 19, 2024
Copy link

github-actions bot commented Dec 19, 2024

🧪 Storybook is successfully deployed!

📊 Dashboard:

@kazcw kazcw marked this pull request as ready for review December 19, 2024 18:32
Comment on lines +16 to +18
defaultValue?: string | null
/** Optional list of possible values that this argument takes. */
tagValues?: string[]
tagValues?: string[] | null
Copy link
Contributor

Choose a reason for hiding this comment

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

These structures reflect their protocol definitions and I would consider leaving them this way. If someone would in the future send SuggestionEntryArgument to LS with nulls, those will be rejected by engine. On the other hand, there's currently no such endpoint in LS, so I leave this decision to you.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change is for consistency with the protocol implemented by the Language Server. I opened a bug about the current protocol's inconsistency with the documentation: #11964

@kazcw kazcw merged commit 77ca61f into develop Jan 2, 2025
40 checks passed
@kazcw kazcw deleted the wip/kw/collapsed-names1 branch January 2, 2025 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: No changelog needed Do not require a changelog entry for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants