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

Codist 7.9 beta #316

Closed
35 tasks done
wmjordan opened this issue Feb 13, 2024 · 32 comments
Closed
35 tasks done

Codist 7.9 beta #316

wmjordan opened this issue Feb 13, 2024 · 32 comments
Assignees
Labels
💾 have download

Comments

@wmjordan
Copy link
Owner

wmjordan commented Feb 13, 2024

Download

Codist 9886

Codist 9884
Codist 9881
Codist 9869
Codist 9861
Codist 9859
Codist 9848
Codist 9846
Codist 9840
Codist 9838
Codist 9822
Codist 9808
Codist 9743
Codist 9635
Codist 9589
Codist 9584
Codist 9583
Codist 9573

What's New

  • General
    • Add control to MessageWindow to suppress reoccurring exceptions
    • Fix a crash in SymbolList
    • Fix VS startup slowdown caused by Codist
    • Don't throw exception if command is unavailable
  • Syntax Highlight & Quick Info
    • Implement support for new features in C# 12
  • Syntax Highlight
    • Support more language types in Comment Tagger
    • Simplify configuration of semantic punctuations and operators
      image
    • Tweak C# tagger to highlight more punctuations and operators
    • Fix syntax highlight feature was not properly controlled
    • Fix C# tagger not being enabled after syntax highlight feature was toggled on
    • Exclude identifier from syntax highlighting due to the VS classification type precedency bug
    • Tweak order of type cast keyword in syntax highlight precedency
    • Fix symbol source highlight not working as configuration change
    • Enhanced highlight for Markdown documents
    • Fix broken comment tagger (Suggestion: Support Comment Tagger in web-related files: razor, cshtml, js, css #328)
  • Quick Info
    • Fix some IAsyncQuickInfoSource instances not under feature control
    • Fix Quick Info displaying above SmartBar, SymbolList when Super Quick Info is disabled
    • Fix containing types not properly displayed for nested types
    • Fix interface member implementations in base type list not correctly displayed on C# Quick Info
    • Fix incorrect Quick Info for qualified C# constructors
    • Fix incorrect captured variable info
    • Bring back missing error icons in C# Quick Info for VS 17.10
    • Auto adjust background color if document editor window background inverts
    • Support inner text in <see> and <seealso> elements in C# XML Documentations (XmlDoc Custom Link Text Not Working For cref in see and seealso #327)
  • Smart Bar
    • Fix crash caused by CopySelectionWithoutIndentation when copying text without indentation from SmartBar
    • Add buttons to Markdown SmartBar
  • Code Analysis
  • Navigation Bar
    • Fix a crash caused by NaviBar
    • Add buttons to MarkdownBar
  • Refactoring
    • Add Make Static refactoring
    • Make seal refactoring work on C# records
    • Fix incorrect insertion point in SealClassRefactoring and ChangeAccessibilityRefactoring
  • Auto Pair Punctuation
    • Add an option to trim selection before inserting paired punctuation
  • Display
    • Add option to hide Copilot button
    • Retry if UI layout override fails on initialization
@wmjordan wmjordan self-assigned this Feb 13, 2024
@laicasaane
Copy link

I've just upgraded to VS 17.9 and observed that Codist interferes with the default colorization. Disabling Codist will bring back the behaviour. My temporary solution is enabling syntax highlight of Codist.

@laicasaane
Copy link

laicasaane commented Feb 14, 2024

With Codist syntax highlight enabled these types lose their color.
image

  • non-nested types are correctly categorized by Codist syntax selector. But their color is wrong, as in the screenshot.
  • nested types are incorrectly categorized. Being either interface, struct or class they're all listed as "C#: Nested type member".
  • tested with both 7.8 release and 7.9 beta versions.

@wmjordan
Copy link
Owner Author

It is strange. I've been working with the 17.9 preview versions for quite a few months and things were fine after Codist 7.8. Does restarting your VS can make things work?

The following screenshot is taken after that I reset my Codist syntax highlight to default.
image
The following screenshot is taken after that I applied my Codist syntax highlight settings.
image

Could you post a sample solution and let me test it?

@wmjordan
Copy link
Owner Author

@fitdev
There's a new beta version here which supports C# 12. Please help test it.

@fitdev
Copy link

fitdev commented Feb 14, 2024

Thank you for the new release! I will try it soon.

BTW, I have been using C# 12 for some time now, and have not noticed any issues with Codist C#-wise. Out of curiosity - what was added in this beta version then?

Also, regarding syntax highlights being messed up - it happened to me on and off for the last 2 or so years - almost every time I would update VS. I am still on an older VS 17.9 preview for the time being, so I don;t know if the issue would affect me were I to upgrade top their latest 17.10 preview released yesterday.

@laicasaane
Copy link

Weird, it works now, and I've done nothing.

@wmjordan
Copy link
Owner Author

what was added in this beta version then?

The new beta has supported highlight of collection expression, primary constructor of base type and the Quick Info of lambda expression return value.
The recently uploaded beta has added more language types to Comment Tagger and fixed some bugs.

@wmjordan wmjordan added the 💾 have download label Feb 15, 2024
@laicasaane
Copy link

laicasaane commented Feb 15, 2024

Hi, it's acting up again. You can try this solution. It's just a source generator solution and you don't need Unity.
https://github.com/Zitga-Tech/ZBase.Foundation.Aliasing/tree/main/Packages/ZBase.Foundation.Aliasing/Source~

After opening the solution in VS, I open this file AliasDeclaration+WriteCode.cs then scroll up and down for a bit then colorization just disappears altogether.

@wmjordan
Copy link
Owner Author

@laicasaane
Could you zip that solution files and upload it here?

@laicasaane
Copy link

@laicasaane
Copy link

For completeness, this is my Codist settings:
Codist.json

@wmjordan
Copy link
Owner Author

@laicasaane
With your configuration file, I managed to reproduce your issue.
Some part of the advance syntax highlight procedure in Codist was ran despite of the disabled feature control.
And a bug in VS's highlight was triggered after that procedure.

At this moment, you have to enable the Syntax Highlight feature in Codist and try your luck.

@laicasaane
Copy link

I'm OK with enabling Codist syntax highlight feature atm. However, this happens: #316 (comment)

@wmjordan
Copy link
Owner Author

wmjordan commented Feb 15, 2024

@laicasaane
You'd been bugged by the aforementioned VS highlight problem.
Somehow the identifier takes higher precedence than interface name.
Please re-enable the syntax highlight feature and clear the foreground color of the identifier in the Syntax Highlight Customization Window.

@laicasaane
Copy link

image
Shouldn't => be categorized as operator instead of C#: Method? Is this the bug in VS highlight too?

@wmjordan
Copy link
Owner Author

Shouldn't => be categorized as operator instead of C#: Method? Is this the bug in VS highlight too?

I deliberately changed the style of => operators in member declarations to indicate the declaration type.

@wmjordan wmjordan pinned this issue Feb 26, 2024
@wmjordan
Copy link
Owner Author

There's a new beta version for test.

The configuration window for syntax highlight has simplified the punctuation highlight options.
image

@fitdev
Copy link

fitdev commented Feb 29, 2024

So does the new behavior extend the previous options to also apply to operators? Previously it was only for "Braces and Parentheses".

@fitdev
Copy link

fitdev commented Feb 29, 2024

In the latest beta operator overloading does not seem to work:
Screenshot_20240229_220206

@wmjordan
Copy link
Owner Author

wmjordan commented Mar 1, 2024

In the latest beta operator overloading does not seem to work

It is a bug in VS.

You can reproduce the problem with Codist disabled.
image

@wmjordan
Copy link
Owner Author

wmjordan commented Apr 7, 2024

Hi, everybody.

There's a new beta which enhances highlight (three more syntax styles for customization) and editing of Markdown documents.

@fitdev
Copy link

fitdev commented Apr 7, 2024

three more syntax styles for customization

Which ones are those?

@wmjordan
Copy link
Owner Author

There is a new test version which addresses VS startup slowdown caused by Codist, reported from the Performance Manager.

@wmjordan
Copy link
Owner Author

The previous 9788 build could crash VS. Please download the newly uploaded 9798 build.

@wmjordan
Copy link
Owner Author

Oops, 9808 should fix the crash.

@fitdev
Copy link

fitdev commented May 27, 2024

I am not sure if has worked correctly in Codist before, and perhaps is no longer working now, but there seems to be an issue with "Find Referrers" command for implicit operators. They only seem to find the cases of direct casts, with implict casts not being returned:

struct Foo {
public static implicit operator Foo(int i) => new Foo();
}

class Usage {

void Test() {
  Foo foo1 = (Foo)25; //This is found
  Foo foo2 = 34; //This will not be found
}

}

Also there is a slight issue where implicit/explicit operators do not have super quick infos for them, they are only selectable using NaviBar.

@wmjordan
Copy link
Owner Author

They only seem to find the cases of direct casts, with implict casts not being returned

It is a known issue. It never works.

You can use the following snippet:

struct Foo
{
	public static implicit operator Foo(int i) => new Foo();
}

class Usage
{

	void Explicit() {
		Foo foo1 = (Foo)25; //This is found
	}

	void Implicit() {
		Foo foo2 = 34; //This will not be found
	}
}

Right click the Foo in the implicit operator declaration and execute the Find All References command in VS.
Only the Explicit method will be in the result list.

@fitdev
Copy link

fitdev commented May 28, 2024

Oh I see - it is a Roslyn issue. Sorry for the comment then. Hopefully they will address it soon.

@wmjordan
Copy link
Owner Author

wmjordan commented May 29, 2024

@fitdev
You are welcome.
It takes quite some considerable calculation to find out implicit conversion occurences.

In short, use implicit conversion sparingly and do not do expensive or complicate works within it.

@fitdev
Copy link

fitdev commented May 29, 2024

In short, use implicit conversion sparingly and do not do expensive or complicate works within it.

I find them extremely useful, especially for "smart" arguments, where the caller may use several different types depending on the need - like an int, or a string, or an enum (in this example for a user-defined TextEncoding type which can be initialized from a set of known encodings, a codepage, and encoding name for example) - all of which get auto-converted to the proper type though these implicit operators. So I wish Roslyn would fix it and allow one to see all instances of implicit conversion taking place.

@wmjordan
Copy link
Owner Author

for "smart" arguments

It is possible to detect this type of situations in the Find Parameter Assignment function though.
Please try the new beta.
It adds a type cast icon to the occurrence if the parameter is taken via implicit type conversion.

Please check whether the detection hurts the performance of that function.

@fitdev
Copy link

fitdev commented May 30, 2024

It is possible to detect this type of situations in the Find Parameter Assignment function though.

Thank you for the new beta! I am not sure though if it is of much help in finding implicit operator usages, since typically there would be 10s of methods - all accepting the same "Smart"-Struct-Typed argument with possibly 100s of usages across all these methods. But being able to see such implicit conversion in the Parameter Assignment list is very nice nonetheless, thank you!

@wmjordan wmjordan unpinned this issue Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💾 have download
Projects
None yet
Development

No branches or pull requests

3 participants