fable-compiler / Fable

F# to JavaScript, TypeScript, Python, Rust and Dart Compiler
http://fable.io/
MIT License
2.9k stars 295 forks source link

[JS/TS] OrdinalIgnoreCase overload for .EndsWith #3892

Closed goswinr closed 1 week ago

goswinr commented 1 week ago

Since string.StartsWith supports a StringComparison.OrdinalIgnoreCase overload, I think .EndsWith should too

goswinr commented 1 week ago

I am not sure where to fix these failing tests, in the .fs file or in .ts ? image

ncave commented 1 week ago

@goswinr Perhaps make the third argument optional, with a sensible default.

goswinr commented 1 week ago

@ncave Do you know why the Rust build fails? For the PR, I tried to do it properly. So went for the transformers.

MangelMaxime commented 1 week ago

@goswinr Sometimes the CI fails and re-running it works.

In the past it was due to the some unreliable behaviour in the tests but since a few days I see errors about not being able to download a NuGet package. And for the later, we can't do something about it (I believe) because we don't do anything crazy with package resolution in this repository 🤷‍♂️

So in general, if you run the tests in your machine (there is a DevContainer ready to be used if you use VSCode) then it is good enough because when we re-run the failing CI they should work at some point.

Edit: The DevContainer make it possible to run the tests on your machine without having to install Dart, Rust, Python, Node, etc on your machine. Plus if you use a Mac, there is a bug in the F#/.NET compiler we don't know how to fix (yet?). This is a StackOverflow errors which happens only when compiling Fable with Fable so sending a reproduction is difficult 😥

goswinr commented 1 week ago

ah, great, now its green 😅

MangelMaxime commented 1 week ago

Seems like .NET 8.0.401 introduced a bug in NuGet package resolution: https://github.com/NuGet/Home/issues/13729

It seems like downgrading to 8.0.304 will fix this issue, so perhaps we are going to consider doing it at the CI level.