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

Bump TextMateSharp version #443

Merged
merged 2 commits into from
Jul 29, 2024
Merged

Conversation

Blquinn
Copy link
Contributor

@Blquinn Blquinn commented Jul 28, 2024

Bumps TextMateSharp version to latest, which allows usage of changes from danipen/TextMateSharp#67

@Blquinn
Copy link
Contributor Author

Blquinn commented Jul 28, 2024

I noticed while working on this change that if I included the package reference for the updated TextMatesSharp:

<PackageReference Include="TextMateSharp.Grammars" Version="1.0.59" />

in my project's csproj that syntax highlighting silently broke.

Maybe someone has thoughts on why/how that might happen?

@danipen
Copy link
Collaborator

danipen commented Jul 28, 2024

in my project's csproj that syntax highlighting silently broke.

Do you mean the IDE's syntax highlighting?

@Blquinn
Copy link
Contributor Author

Blquinn commented Jul 28, 2024

Do you mean the IDE's syntax highlighting?

No, the TextEditor widget's syntax highlighting stopped working.

@Blquinn
Copy link
Contributor Author

Blquinn commented Jul 28, 2024

I should add that I tested this before PR'ing the Grammars change by branching master of this repo and bumping the Grammars package. Syntax highlighting was working.

@Numpsy
Copy link

Numpsy commented Jul 28, 2024

I noticed while working on this change that if I included the package reference for the updated TextMatesSharp:

<PackageReference Include="TextMateSharp.Grammars" Version="1.0.59" />

in my project's csproj that syntax highlighting silently broke.

Maybe someone has thoughts on why/how that might happen?

I got the same when I tried that to get the System.Text.Json update - Visual Studio says this:

image

I haven't had time to look at anything beyond that.

@Numpsy
Copy link

Numpsy commented Jul 28, 2024

I'd guess caused by danipen/TextMateSharp#59 -

image

@Blquinn
Copy link
Contributor Author

Blquinn commented Jul 28, 2024

Ah, I may be able to take a look at that tonight. It's a little concerning that the stack trace gets buried... maybe that's the configuration of my app though.

@Blquinn
Copy link
Contributor Author

Blquinn commented Jul 28, 2024

I tried checking out AvaloniaEdit 11.0.6 and bumping the TextMateSharp version to 1.0.59, which won't compile.

As @Numpsy showed there's a breaking change in TextMateSharp where some int fields are changed into the FontStyle enum. So the current version of AvaloniaEdit on Nuget isn't compatible with versions of TextMateSharp > 1.0.56.

I'm pretty confused why I don't see an exception being thrown. Perhaps dotnet is happy to do this conversion between ints and the enum when I'm using pre-compiled byte-code or something.

Things do compile and the demo runs normally against master (This PR) though. I think there just needs to be a newer version of AvaloniaEdit released to resolve the issue.

@danipen
Copy link
Collaborator

danipen commented Jul 28, 2024

@Takoooooo please could you do that?

@maxkatz6
Copy link
Member

@danipen I can do a new release. But should I include this PR? If you want it to be compatible with a new text mate.

@danipen
Copy link
Collaborator

danipen commented Jul 29, 2024

Well ... the PR that fixes the issue is this one #441.

Also note that the TextMateSahrp API changed some versions ago (at version 1.0.56). The API change is minimal (it's just changing a int type by an enum) so I think we're ok going with it and merging this PR.

@danipen danipen merged commit 144483e into AvaloniaUI:master Jul 29, 2024
2 checks passed
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.

4 participants