sebastienros/fluid

System.MissingMethodException with Parlot >= 0.0.27

Closed this issue · 4 comments

Fluid.Core 2.10.0 works with Parlot 0.0.25 and 0.0.26, but when Parlot is upgraded to >= 0.0.27 then the following exception occurs when calling parser.TryParse:

Unhandled exception. System.MissingMethodException: Method not found: 'Parlot.Fluent.Parser`1<!!0> Parlot.Fluent.Parsers.AndSkip(Parlot.Fluent.Parser`1<!!0>, Parlot.Fluent.Parser`1<!!1>)'.
   at Fluid.FluidParser..ctor(FluidParserOptions parserOptions)
   at Fluid.FluidParser..ctor()
   at Program.<Main>$(String[] args) in /home/andreas/SourceCode/Privat/FluidCoreParlotTest/FluidCoreParlotTest/Program.cs:line 5

I've attached a small project that reproduced the error:

FluidCoreParlotTest.zip

Parlot is wrongly using patch versions updates while introducing breaking changes. Don't upgrade Parlot directly when using Fluid, only bump Fluid when a new version is released.

You shouldn't even have a direct reference to Parlot, unless you are also using it yourself for something else in the same project.

BTW the updated Fluid package with the latest Parlot is already available on MyGet. I'll soon release it on NuGet.

You shouldn't even have a direct reference to Parlot, unless you are also using it yourself for something else in the same project.

I ran dotnet paket update to update all packages and it updated Fluid.Core to 2.10 and Parlot to 0.0.28 because the version constraint is Parlot >= 0.0.25, thats how I encountered this exception.

I had to pin Parlot to 0.0.26 to prevent this exception.

I use in the same project NCalcSync (4.3.3) and Fluid.Core (2.10.0). Both use Parlot but because the former requires Parlot >= 0.0.28, this package version is installed. It results in the System.MissingMethodException. Hence, "not upgrading Parlot" is not a solution at all.

BTW the updated Fluid package with the latest Parlot is already available on MyGet. I'll soon release it on NuGet.

When can we expect the next version @sebastienros ? Thank you.