-
Notifications
You must be signed in to change notification settings - Fork 648
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
Version 3.x should support .NET Core LTS version(s) #1178
Comments
Changed to say 3.0, as RollMajorVersion is not the default here. |
We should support .netcoreapp3.1 and .netcoreapp2.1 |
Hi, EDIT: |
I plan to resolve it this weekend, barring something chaotic. I messed up one package in the 3.2.4 release (see: #1209) so 3.2.5 will fix that botched FluentMigrator.Console package. |
Awesome! Thank you for the update. |
@qhero I got pretty far with this over the weekend but there is still some finishing touches. I'd say realistically release 3.3.0 will go out next weekend. However, as you can see from the updates on the initial post, I did make huge progress and covered a ton of ground. I simply didn't anticipate the complexity/typing/fixing compile errors around SapAnywhere support. |
Down to ~28 tests failing (21 in netstandard2.0, 21 in netstandard2.1, 28 in net461). All tests are BatchParserTests in
I think this has something to do with SqlAnywhere batch parsing but I'm not sure - I would expect the net461 tests to still pass. @eloekset : Any ideas? Do you think if I pushed my progress to github.com/jzabroski/fluentmigrator you could take a look? |
70 tests fail, all in Batch Parser component.
I pushed my progress so far. |
Ok, I'll take a look at it. |
Orthogonal to review, I should update all the PackageReference(s) to use Nuget version ranges so that dependabot doesn't go crazy + it should make dependabot more useful to us in auto-bumping dependencies. |
I'll have to call it a day. This was a tricky one to understand. What I've tried to do, is running your master branch and origin/master and compare the results of ProcessorBatchParserTestBase.Issue442 for the SqlServer2016 processor. They both get a mockedCommand that contains 6 Invocations, and it fails because they are marked as not verified, while they should be marked as verified. But when I step through the code, I can't see anything that goes differently in the two branches. (Be aware that the list of invocation increases as you hover over members while debugging.) I'm starting to suspect that the bug is somewhere else. I haven't checked, but maybe there are two different versions of the mocking library? (BTW there's a build error in your master branch, but that's on the Console project, so it shouldn't have any influence on the code that gets executed in these processor unit tests.) Maybe if I have another look at it some other day, I'll shift focus and find something interesting. It looks like I've just spent time looking into details of things that actually works today. And I only ran the net461 tests. I haven't debugged the same test for the other target frameworks, but all fail so it shouldn't matter which one we focus on. |
Good catch, I forgot I upgraded that. I'm also suprised the depandabot build didn't fail for that PR. We could be hitting this: devlooped/moq#858 (comment) (I found this by searching across all open/closed issues for VerifyNoOtherCalls) It's not mentioned in the release notes but it seems to match our problem. Will dig deeper when I get a chance; feel free to beat me to the punch. Here are the release notes that mention VerifyNoOtherCalls by name. 4.12.0https://github.com/moq/moq4/blob/master/CHANGELOG.md#4120-2019-06-20
4.10.0 https://github.com/moq/moq4/blob/master/CHANGELOG.md#4120-2019-06-20
|
|
I think if we use any legacy .NET Framework MSBuild,
Yeah, makes sense. Was just hoping you knew a precise reason why. But I'm not surprised you just know its DLL Hell, as until recently, I lacked the vigor myself to pursue to root cause of each DLL Hell scenario individually. It's just that DLL Hell takes up so much of my time I wanted to be careful in enumerating every scenario. I decided to push ahead with #1218 as part of this PR. It is a bit more work but will make the "test framework" vs the "Tests" more explicit, and allow us to more gracefully handle more migration runners in the future.
Very good idea. Will do it and report back if I run into any problems.
|
I started work on splitting out SqlAnywhere tests into their own project as part of wrapping up this change. I'll probably push them as separate commits, effectively wrapping up the previous PR with rolling back updates to Moq for now. |
Hi @jzabroski |
I want to finish it by the end of the summer. I maintain two projects, this and RazorLight. This PR is rather enormous. To complicate things, I was falling behind accepting PRs to FluentMigrator, so I chose to accept those PRs and do small releases. So now I have to merge those PRs to my jzabroski/FluentMigrator branch, which is extra work. It's a fine balance between moving features forward and keeping project interest up and optimizing for what's easiest / least amount of work for me to do. In this case, I chose to do more work and accept more PRs and have to do more merging. I've also taken some time to write up some design docs on where I want the project to go long-term, as I didn't write the current runner architecture. See #1288 Note, this is not my full time job and I don't get paid for it, so I do all this free work "on the side" as time permits with family and my other business objectives (I run my own software company). |
I know this is not you fulltime job, that's why I can't thank you enough for what you do! Thank you for the catch up. |
We will get there. I think once proper 3.1 support is implemented, adding features is gonna be a relative breeze. I have so many cool, innovative ideas in this space that nobody has even thought of yet. I haven't even written design docs for the really cool ideas because I don't want anyone stealing my original thoughts and then being like, "FluentMigrator doesn't do this" (as is common in open source software). It's going to really advance state of the art in "DbOps". |
I tried this but I found it was tricky to "just use c# 8". I followed Stuart Lang's guide, in particular, and what I found is that when non-.NET Core 3.0 target frameworks use C# 8.0, if you include features like switch expressions in the code, you get lots of "Red ink" in the Visual Studio IDE that throw off the whole experience of using Visual Studio. I found Stuart Lang's guide to getting C# 8 to work in net461, but its a lot of hacks in my opinion. Maybe I'll give it a second shot, but I looked back today at my notes on C# 8 in non-.NET Core 3 environments, and saw some problems. |
Is there anything we could do to help get this to completion? I wouldn't mind donating some time although admittedly have no idea where to start or how to help. I started looking into this and it started to become a rabbit hole for me. |
Done in 5.0.0 |
We should support .netcoreapp3.1 and .netcoreapp2.1
The reason is that .netcoreapp3.0 and .netcoreapp2.2 is EOL (End Of Life), whereas .netcoreapp3.1 and .netcoreapp2.1 are LTS (Long Term Servicing).
This is supported in Version 4.x (develop branch), but we will likely be servicing Version 3.x for awhile, so it makes sense to add support for .NET Core 3.0
Process
Out of scope: In the future, we should consider targeting netstandard TFM family that is parallel support to the underlying target frameworks. In practice, this means adding "
netstandard2.1
" to the list ofTargetFrameworks
Lessons Learned
Next time, upgrade dependencies first so that the latest versions of each dependency work against currently supported TargetFrameworks.
Be careful of TargetFramework vs. TargetFrameworks.
.NET Core 3.0 introduced
[NotNull]
attribute. If you reference JetBrains.Annotations and System.Diagnostics.CodeAnalysis in the same file, you'll get a compiler error. The fix is to use the NETSTANDARD2_1 pre-defined symbol (see also Target Frameworks in SDK-style projects).FluentMigrator.DotNet.Cli depended on an Obsolete extension method
There is a guide on Microsoft Docs for Migrate from Microsoft.Extensions.Logging 2.1 to 2.2 or 3.0:
ILoggerFactory.AddDebug
, which is now removed in .NET Core 3.x.Autofac-specific issues
McMaster.Extensions.CommandLineUtils now 2.6.0
FSharp.Core now 4.7.1
Microsoft.Build.Utilities.Core
Sap.Data.SQLAnywhere doesn't exist for .NET Core.
Microsoft Jet (via ADOX.dll) doesn't exist for .NET Core.
FluentMigrator.Tests.csproj
if the build was being built using MSBuild Core, but never had a check to guard against running tests on .NET Core.fluentmigrator/test/FluentMigrator.Tests/FluentMigrator.Tests.csproj
Line 79 in 8427429
As a result,I was wrong about this.JetTestTable.cs
and other integration tests for Jet are disabled on .netstandard2.0 and .netstandard2.1 TFMs for xUnit test runner.Type.GetTypeFromProgID("ADOX.Catalog");
might be footgun code.Wrapped
ConnectionStringManagerTests.cs
in a#if NET461
checkFluentMigratorConsoleTests.cs
should be moved to its own Test project to avoid#if NET461
.NET Core 3.0 does not support
AddJsonFile
Microsoft.Extensions.Configuration.Json
Minor refactoring work
Global.props
Package.AssemblySigning.props
file. This will make it easier to remove assembly signing in the future (cf Remove assembly signing #1050 )<Description>
field so it doesn't run on forever without a line break.<Import ...>
MSBuild directives to the top of each csproj file, so that it's clear what global variables exist from contexts outside the file itself.TODO Items
FluentMigrator.Runner.SqlAnywhere
needed to add netstandard2.1 to the TFM list in order for FluentMigrator.Tests to be happy.<Description>
field in .csprojConnectionStringManager.cs
andNetConfigManager.cs
is using/was using#if NETFRAMEWORK
- should it use#if NET461
instead?.Password("pass")
extensionPackageReference
(s) to use Nuget version ranges so that dependabot correctly auto-bumps dependencies.The text was updated successfully, but these errors were encountered: