Closed ArchLeaders closed 1 week ago
@ArchLeaders Ok thanks.
There is one problem, however.
Currently, We need to write it in C# 9 because it shares source code with the Unity package. Is it possible to get it to compile through the Unity environment?
I would like to check on my end, but it will be a bit later.
Unfortunately, I have no idea how to use Unity. I can look into it, but it will probably take just as long to figure out how to use Unity as it would to wait.
I'll comment here if I find anything though.
Hi @hadashiA!
Is there any reason to compile it through Unity instead of using a precompiled dll? If it needs some Unity APIs you could reference Unity's dlls in csproj (but don't ship them with the package). That's how I usually do it in my projects.
Also, changing type of a parameter is a breaking change and I really hate when projects do that. Please add the original method back as an overload.
Also, changing type of a parameter is a breaking change and I really hate when projects do that. Please add the original method back as an overload.
Makes sense, although string
can be implicitly converted to ReadOnlySpan<char>
so it won't break anything.
Hi,
Is there any reason to compile it through Unity instead of using a precompiled dll? If it needs some Unity APIs you could reference Unity's dlls in csproj (but don't ship them with the package). That's how I usually do it in my projects.
Ah yes,, perhaps we could distribute the dlls. Source code distribution may have the advantage that it is easier for users to debug and understand. However, when I developed this, there was not much difference in compilers between .NET and Unity, but not so much now. I think I'll switch to the Dll distribution.
Also, changing type of a parameter is a breaking change and I really hate when projects do that. Please add the original method back as an overload.
👍
Makes sense, although
string
can be implicitly converted toReadOnlySpan<char>
so it won't break anything.
I am not sure but i think it still breaks, you will need to recompile the project that refs on that case
In #114, I've been added ReadOnlySpan<char>
overloads.
The dll distribution is a major change. I would like to discuss it in a separate issue. Thanks.
Changes the input parameter of
Utf8YamlEmitter.WriteString
fromSystem.String
toSystem.ReadOnlySpan<char>
for more optimal writing scenarios.Note, this PR changes the project
LangVersion
from9
to11
to use pattern matching on aReadOnlySpan<char>
.