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

Call-graph based Unity.Burst support #1665

Merged
merged 42 commits into from
Jul 1, 2020
Merged

Call-graph based Unity.Burst support #1665

merged 42 commits into from
Jul 1, 2020

Conversation

Domonion
Copy link

Support for Unity.Burst

highlights access to managed objects, object creation etc
transitively propagates burst contexts
highlighting are taken and annotated to match Burst compiler

@Domonion Domonion added this to the Rider 2020.2 milestone May 21, 2020
@Domonion Domonion self-assigned this May 21, 2020
@Domonion Domonion added the WIP Work in progress. Do not merge! label May 21, 2020
Artemiy Kononov added 8 commits June 3, 2020 01:38
2. test additions and fixes
3. multiple PerformanceCriticalCodeCallGraphMarksProvider.cs and ExpensiveCodeCallGraphAnalyzer.cs fixes and enhancements
4. burst ui
5.
2. BurstCodeAnalysisUtil.cs refactoring and clarifying
Copy link
Member

@citizenmatt citizenmatt left a comment

Choose a reason for hiding this comment

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

  • I'm not sure if these new highlights should be configurable severity. If they're compiler errors, can't be disabled, and will break compilation, we should treat them as static severity. We can always disable analysis in options if there are problems
  • We shouldn't show the compiler ID as part of the warning - we don't do this anywhere else, e.g. for C# compiler errors/warnings, although I think we can associate a highlight with. It also makes it harder to read the code to know what the highlight is about.
  • Replace the backtick </code> with single quote '` to match other R#/Rider messages
  • Remove all full stops from the end of <Message> attributes. We don't end tooltips with a full stop.

Are the tooltip messages/descriptions taken from the compiler error messages? We might want to do something a little more user friendly, like we do with C# compiler messages.

{
public CallGraphBurstMarksProvider(ISolution solution)
: base(nameof(CallGraphBurstMarksProvider),
new CallGraphOutcomingPropagator(solution, nameof(CallGraphBurstMarksProvider)))
Copy link
Member

Choose a reason for hiding this comment

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

I know it's an SDK method, but should Outcoming be Outgoing?

Copy link
Author

Choose a reason for hiding this comment

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

Outcoming was chosen to show that it is opposite toIncomingPropagator, so idk if this is correct change


<SeverityConfiguration>
<Group name="UnityHighlightingGroupIds.Burst">
<Tag externalName="BC1001Error.HIGHLIGHTING_ID" default="WARNING">
Copy link
Member

Choose a reason for hiding this comment

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

Should this be an error highlight instead of a warning? And unless these can be disabled, shouldn't they be static highlights?

Copy link
Author

@Domonion Domonion Jul 1, 2020

Choose a reason for hiding this comment

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

Burst compiler is a special case: if compiled at the editor - despite unsuccessful compilation unity project will be executed, if built as standalone - unity will consider it as a normal error, so I think warning is the best severity, let the user decide if this is critical for him

resharper/resharper-unity/src/Rider/UnityOptionsPage.cs Outdated Show resolved Hide resolved
<SeverityConfiguration>
<Group name="UnityHighlightingGroupIds.Burst">
<Tag externalName="BC1001Error.HIGHLIGHTING_ID" default="WARNING">
<Title>BC1001</Title>
Copy link
Member

Choose a reason for hiding this comment

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

I think these titles need more information - I think they're used to display the warning in the Inspection Severity page, and should reflect the tooltip, rather than the compiler ID

@Domonion Domonion force-pushed the net202-kononov-cg branch 2 times, most recently from 3f413d6 to acdc899 Compare June 24, 2020 23:53
@Domonion Domonion merged commit 7c65dac into net202 Jul 1, 2020
@Domonion Domonion deleted the net202-kononov-cg branch July 1, 2020 23:46
@citizenmatt citizenmatt removed the WIP Work in progress. Do not merge! label Jul 2, 2020
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.

3 participants