-
-
Notifications
You must be signed in to change notification settings - Fork 126
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
Remove the magic "ReferenceAssembliesDirectory" #67
Closed
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
033ab80
Remove the magic "ReferenceAssembliesDirectory" and replace with usag…
wasabii 5a0811f
Added ikvmc.Tests project, which runs on netcore3.1, but includes pub…
wasabii d2bd5fd
Added a dynamic data test that runs once per artifact build, and diff…
wasabii 9eec400
Use CliWrap.
wasabii 58745ba
Verify exit code option.
wasabii ec8eda7
Removing the -nostdlib option. Relying exclusively on specifying refe…
wasabii de89394
Check private and public package counts before using.
wasabii 8f93e85
The tests do come with the compilation context, so they can run ikvmc…
wasabii 5fc550b
Removed LegacyAssemblyResolve. It appears this was used for Stub gene…
wasabii 1150fd0
Hmm
wasabii 1268fc9
Merge branch 'develop' into bug/65
wasabii e9d2f24
Fix copyright issue.
wasabii e696552
Hmm
wasabii File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought that the
mscorlib
functionality was moved into an assembly namedSystem.Private.CoreLib
(or at least that seems to be the case since .NET 5.0). This seems to be backed up here: dotnet/roslyn#16211 (comment). Although, later they mention that it isWhy is
netstandard
being used here? Could this be an artifact from the early attempts at targetingnetstandard2.0
and laternetstandard2.1
? And could it be the reason for #74?I am not saying that this is wrong per se, but I am wondering if there is any documentation indicating
netstandard
is what we should be looking for.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because there are type forwards in it, and the code path doesn't differentiate between the static and dynamic compilers. It is not optimal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They mention here:
Is this being accounted for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the user passes them in. The goal is to follow the same requirements as Roslyn. So, if the Roslyn guys say you need to do that, we should tell our users they need to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said, this PR isn't a complete overhaul of the way assemblies are located and reflected on. It's a minor fix that removes the hard coded attempt at discovering a search path, and unifies two different discovery paths. The rest of the code is still doing what it did before: expecting a core library with the core types like Object, String, etc.
It would be better, in my view, if IKVM discovered these by actually searching the assemblies.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That explains why #74 is failing (and why I am getting the same error when trying to convert log4j). However, since we are not actually shipping
netstandard.dll
with IKVM tools (it isn't in the .NET Core 3.1 reference assemblies directory), what is the procedure we should give users to provide a path to it forikvmc
?On my system, I have several copies, but the advice here is to use
C:\Program Files\dotnet\sdk\2.0.3\Microsoft\Microsoft.NET.Build.Extensions\net461\lib\netstandard.dll
. It sounds like you need Visual Studio to be installed in order for this path to exist, though. And it is a little unsettling that it is in anet461
folder.It looks like there are a couple of NuGet packages depending on whether we need
netstandard2.0
ornetstandard2.1
. How do users discover which one to use? And what if there are dependencies that targetnetstandard1.x
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I had thought netstandard was around in every core sdk for compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it is. But it is not in the
ref/
directory, it is underC:\Program Files\dotnet\shared\Microsoft.NETCore.App\3.1.0
. There appears to be one for every installed SDK version. And this one is an implementation ofnetstandard2.1
.Of course, for SDKs from .NET Core 2.x, the implementation is
netstandard2.0
.There is also a standalone reference to .NET Standard 2.1 in
C:\Program Files\dotnet\packs\NETStandard.Library.Ref\2.1.0\ref\netstandard2.1
.Both seem to get me past the
netstandard
error.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, after doing it this way (excluding
-static
and-classloader:
), it works. It seems that the-lib:<ikvmtools>/refs
option somehow causes it to search fornetstandard.dll
, but using-r:<ikvmtools>/refs/*.dll
does not.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can I ask how to use it?