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

Support define symbols in .asmdef files #2191

Merged
merged 22 commits into from
Oct 16, 2021
Merged

Conversation

citizenmatt
Copy link
Member

@citizenmatt citizenmatt commented Oct 15, 2021

This PR will:

  • Parse and cache define symbols from .asmdef files, evaluating rules against installed packages
  • Provide context to the parser for source code from compiled packages, so that the correct #if branches are highlighted (RIDER-50221 + Wrong define symbols in packages #710)
  • Grey out defineConstraints values that are not defined for a .asmdef file
  • Grey out versionDefines symbols that are not defined because a package is not installed or does not meet the version expression
  • Show version of installed packages as an inlay hint (with options) for the name property of versionDefines
  • Provide code completion for symbols in defineConstraints
  • Provide code completion for packages and the special "Unity" symbol in the name property for versionDefines
  • Validation for symbols in defineConstraints and versionDefines.define and the version range versionDefines.expression

Also introduces nullable reference types in modified files, because we're on C#9, might as well use it.

@citizenmatt citizenmatt added this to the Rider 2021.3 milestone Oct 15, 2021
@citizenmatt citizenmatt self-assigned this Oct 15, 2021
@citizenmatt citizenmatt merged commit 85b5ce8 into net213 Oct 16, 2021
@citizenmatt citizenmatt deleted the net213-mte-package-defines branch October 16, 2021 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants