Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Update checks so that netstandard2.0/2.1 projects are supported and will build #87

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

Closed
wants to merge 3 commits into from

Conversation

hwthomas
Copy link
Collaborator

@hwthomas hwthomas commented Sep 5, 2022

The checks for the support of netstandard projects (2.0 and 2.1) were outdated

This PR updates those checks for the current versions of Mono and dotnet-sdks

NB This PR requires PR #77 as well so I rebased my branch ns2.1_fix to the tip of branch fix_Issue_75
however git seems to have combined the commits from both these branches (which is correct, of course) but I was expecting them to be done as 2 separate PRs. One day I might get the hang of git!

 and update MSBuildEvaluationContext.cs accordingly

    IntrinsicFunctions are now loaded at runtime from the current version
    of Microsoft.Build.dll, as identified by the active runtime.

    The old IntrinsicFunctions test is no longer meaningful and has been removed

    This fixes Issue dotdevelop#75 so that all project properties are now evaluated correctly.
….4 or greater

or for DotNetCore (runtime) versions 3.x or greater (ie includes .net5.0+)

    previously only netstandard2.0 was supported for mono 5.2 AND netcore3.0 installed
@@ -34,12 +34,14 @@ namespace MonoDevelop.DotNetCore
{
class DotNetCoreVersion : IEquatable<DotNetCoreVersion>, IComparable, IComparable<DotNetCoreVersion>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wouldn't it be more interesting to keep track of which net standard versions are supported by the .net sdks? this way we don't need to compare the sdk's version number, because not every .net sdk supports every net standard version.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking back, I really don't know why I changed this version from (2, 1, 602) to (2, 1, 30)!. The matrix of supported versions etc has never been a strong point for me. I was just going for the minimum changes to the existing code (and way of doing things) that fixed the netstandard issue. @gluckez by all means update if you have better understanding

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwthomas If it helps, I will certainly not stop you from merging it ;) And I'll have a look tonight to see if the knowledge about the supported frameworks and netstandard versions can be centralized.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gluckez Many thanks - I appreciate that.
So far, I'm afraid I've been focussing on getting net5ff and netstandard projects working, and not being too concerned about improving the state of the codebase!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hwthomas I guess that's why I'm here xD I'm not too familiar with the codebase yet, but if I can make small improvements while learning, I'll give it a go.

@knocte
Copy link
Member

knocte commented Oct 29, 2022

3 questions:

@hwthomas
Copy link
Collaborator Author

@knocte 3 (provisional) answers

  • I've done some simple testing with a netcoreapp3.1 Main program and a netstandard2.0 library, which worked OK. I've also built and debugged the GtkSharpTest TestApp from ( https://github.com/dotdevelop/xwt ) which is a more realistic netcoreapp3.1/netstandard2.0 application, but more real-life feedback would be appreciated.
  • This pending ns2.1_fix PR has recently been 'leap-frogged' by PR use funcloader for cairo library in cairo extensions #81, which has resulted in a merge conflict that wasn't there originally. It's a very simple fix, which just needs ns2.1_fix rebasing to the new HEAD of main, but I've got myself in a mess in the past with things like this, so I was leaving it for now (!)
  • The CI fails with DOWNLOADNUPKG : Ssl error : 1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED [/__w/dotdevelop/dotdevelop/main/src/addins/MonoDevelop.UnitTesting/MonoDevelop.UnitTesting.csproj] which has been a problem for a year or more. Re-running the workflow usually succeeds, but I don't have the knowledge/experience to know what would fix it properly - and I can only re-run the workflow on my own fork. The 3 combined PRs (Update MonoDevelop.PackageManagement files and NuGet dlls to release-5.8 #91) pass the CI run OK in my fork.

Hope this helps, and thanks again for the feedback.

@gluckez
Copy link
Collaborator

gluckez commented Oct 29, 2022

@hwthomas If the merge conflicts are caused by my pr, maybe there's something I can do to help? I don't have write access here, but I think the issue may be in the changes in MonoDevelop.Core.Tests.csproj. I think a local merge could help identify the conflicts, but could create conflicts in your other pr's, which also include these changes.

@hwthomas
Copy link
Collaborator Author

hwthomas commented Oct 29, 2022

@gluckez Thanks for your offer to help. The conflict is indeed in MonoDevelop.Core.Tests.csproj, where after your PR merge, I need to remove the line

  • <Compile Include="MonoDevelop.Projects\IntrinsicFunctionsTests.cs" /> but keep your

  • <Compile Include="MonoDevelop.Utilities\TEST.LibraryTools.cs" />

If I were to rebase branch fix_Issue_75 (which should also rebase all my other subsequent commits) from its current origin of 068675d to the latest main of 0bab871 I think this should fix the conflict as well.

However, I'm not completely sure! And I'm not sure if doing a rebase on my local branch fix_Issue_75 and pushing this upstream is all that needs to be done. I'm particularly wary of changing things that I've already 'published'.

Edit: Or perhaps it's simplest just to deal with this conflict now, and handle any others as they arise?

Any thoughts?

@gluckez
Copy link
Collaborator

gluckez commented Oct 29, 2022

@hwthomas I'm pretty sure merging main into net5ff_nuget and completing only that pr will do the trick. that branch is based on the branches you used for the other pr's, so there's no need to merge them all sequentially. the last branch includes all commits from previous pr's. If you still want to merge sequentially, then you'll have to rebase fix_issue_75 first, then sequentially rebase the other branches as well because it would cause new conflicts in the other pr's.
EDIT: the line that's causing the conflict, is really not that important. It's just a basic unit test to make sure the libraries were still loaded properly, but it can be removed I guess.

@hwthomas
Copy link
Collaborator Author

@gluckez Many thanks for that advice - I'd been looking more at merging my commits into main and missed the obvious alternative of merging main into my latest branch. I'll give it a go.

@hwthomas
Copy link
Collaborator Author

@gluckez That seems to have worked! I've merged the latest dotdevelop/main into my net5ff_nuget and in my fork CI run 161 (https://github.com/hwthomas/dotdevelop/actions/runs/3356254896) passes OK. Nothing here seems to have changed though, so I'll have to rely on @lytico making sense of it all.

@gluckez
Copy link
Collaborator

gluckez commented Oct 30, 2022

@hwthomas that's because net5ff_nuget includes the commits from this branch, but not the other way around. Your last pr was in fact updated and conflicts are resolved there. If you want to do the same here, you should also merge main into this branch. but it's not needed because all commits from all pr's will be merged if you merge #91 . it does look like the CI failed on that last pr, but that's again due to the certificate errors, I bet it'll run fine if you trigger it again.

@hwthomas
Copy link
Collaborator Author

hwthomas commented Nov 1, 2022

@gluckez thanks again - I've viewed the branches with git log --graph and it all looks much clearer. I'll leave things as they are now and deal with any queries if the PRs eventually get merged.

  Incorporate changes in PR#81 from @gluckez to fix conflicts
@hwthomas hwthomas mentioned this pull request Nov 23, 2022
@hwthomas
Copy link
Collaborator Author

Merged as part of PR #96

@hwthomas hwthomas closed this Jan 16, 2023
@knocte
Copy link
Member

knocte commented Jan 17, 2023

The CI fails with DOWNLOADNUPKG : Ssl error : 1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED (...) Re-running the workflow usually succeeds,

If this above was not actioned, I would simply recommend retrying in CI about 3 times, as a workaround. Later when dotnet restore can be used, the retry workaround can be removed.

@knocte
Copy link
Member

knocte commented Jan 17, 2023

If this above was not actioned, I would simply recommend retrying in CI about 3 times, as a workaround. Later when dotnet restore can be used, the retry workaround can be removed.

Oops, I've realised I already suggested this, here: #90 (comment)

@hwthomas hwthomas deleted the ns2.1_fix branch February 24, 2023 16:33
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.

3 participants