Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Use subdirectories in publish for native #675

Merged
merged 1 commit into from
Jan 5, 2016

Conversation

brthor
Copy link

@brthor brthor commented Dec 30, 2015

First pass on including subdirectories for use in Native.

PTAL @schellap @gkhanna79

@schellap
Copy link

This sounds good. Does it run fine on the E2E test? We should co-ordinate checking in since CoreRT publish needs to have --native-subdirectory flag for --ilcpath to not break CoreRT CI.

For your future PR, corerun/corehost has to be copied as well and the appdep build hack to drop inside this folder.

@brthor
Copy link
Author

brthor commented Dec 31, 2015

@schellap Waiting on results here for E2E.

schellap pushed a commit to dotnet/corert that referenced this pull request Dec 31, 2015
This should help in packaging for cross compilation. The CI should pass once dotnet/cli#675 is ready to go.

Cc @gkhanna79
@brthor
Copy link
Author

brthor commented Dec 31, 2015

@schellap I am seeing that on windows, the subdirectories are included and things are just fine.

On Ubuntu, the files are getting flat packed.

Can you quickly confirm that the Ubuntu NuGet Packages are structured to take advantage of the subdirectories? This will help diagnose what's going wrong here.

captureaa

@schellap
Copy link

@brthor, can you give permissions to your fork so I can buddy test for you? Or if you find it easy, you can clone dotnet/corert and switch to native-subdir branch and drop a CLI (your stage2) inside /bin/tools/cli/.

dotnet/corert#580

@schellap
Copy link

image

@schellap
Copy link

Are your path separators good?

@brthor
Copy link
Author

brthor commented Dec 31, 2015

@schellap added as a collaborator

@brthor brthor changed the title [WIP donotmerge] Use subdirectories in publish for native Use subdirectories in publish for native Dec 31, 2015
@schellap
Copy link

@brthor, I'll test this on our repo once you are ready to go with CLI CI.

@brthor
Copy link
Author

brthor commented Dec 31, 2015

Error: Unable to load DLL 'jitinterface': The specified module could not be found.

@schellap Do you know how this dlll is being loaded?

@brthor
Copy link
Author

brthor commented Dec 31, 2015

This dll is moved to the path bin/lib/dotnet/jitinterface.dylib

It looks like this dll is picked up by ILCompiler, @schellap does it need accompanying changes?

@schellap
Copy link

This needs to be PInvoked by ILC. Is there a way it can land next to ilc like ryujit? Eventually it might come from ryujit like package.

@brthor
Copy link
Author

brthor commented Dec 31, 2015

The dll would need to not be in a subdirectory in the nuget package, so it doesn't get published to a subdirectory when publishingdotnet-compile-native

Think this:
https://github.com/dotnet/corert/blob/master/src/packaging/packages.targets#L53

<Text><![CDATA[        <file src="../%(Identity)" target="runtimes/$(NuPkgRid)/native/lib/dotnet/%(Identity)" /> ]]></Text>

Would need the path changed:

<Text><![CDATA[        <file src="../%(Identity)" target="runtimes/$(NuPkgRid)/native/%(Identity)" /> ]]></Text>

@schellap
Copy link

Ah, I see. I thought the lib/dotnet/.dll was required by NuGet and publish for it to be picked up. I was just going to ask if we can omit special folders like lib, sdk that are "known names" and split on "native/content". I will get a PR and new packages out for you!

@schellap
Copy link

@brthor, having it at root of native folder won't break when NuGet content support comes in and native-subdirectory goes away, right?

@brthor
Copy link
Author

brthor commented Jan 1, 2016

At that point we'd need to take it out of the native folder anyways wouldn't we?

@schellap
Copy link

schellap commented Jan 1, 2016

Yeah, I realized that later. Anyway, we would have to make too many changes, so it is a non-issue.

@schellap
Copy link

schellap commented Jan 1, 2016

How does this look for you? 1.0.4-prerelease-00005

@schellap
Copy link

schellap commented Jan 1, 2016

I don't think we need to remove from the native folder as it is a native library. We would however change the layout of the SDK package to use the appropriate content folders. Note: jitinterface.dylib is not content but a PInvoke binary which should just do what other PInvoke binaries do. How is always using --native-subdirectory not an issue for the CLI, you guys don't have any PInvoke libraries?

The real issue is that --native-subdirectory hack overrides known folder (sdk/lib) treatment. I am fine with your current plan as anyway changes are necessary in the future and the support for content will come sooner.

@gkhanna79
Copy link
Member

The changes, at a highlevel, look fine to me. However, have you looked into the OSX failures?

Also, please do squash the commits.

@brthor
Copy link
Author

brthor commented Jan 4, 2016

@gkhanna79 OSX failures are related to the discussion above. This would happen on Ubuntu as well but the test is skipped for the moment. Will definitely squash the commits, thanks.

@schellap I see what you are saying with this dll that it will not be part of the contents and will remain in native. Looking into similar packages though, the lib/dotnet portion is typically used instead of native not with it.

For example in runtime.ubuntu.14.04-x64.Microsoft.NETCore.ConsoleHost version 1.0.0-rc2-23616 I see the following path for native components: runtimes\ubuntu.14.04-x64\native

Whereas in runtime.win7.System.IO.Pipes I see the following path (for a managed dll): runtimes\win7\lib\dotnet5.4

I think removing the lib/dotnet portion will not affect the usability of the package even after content support comes online.

@brthor
Copy link
Author

brthor commented Jan 4, 2016

@dotnet-bot test this please

should incorporate that latest pushed package

This gives support for files to publish in subdirectories
from dependency nuget packages.

Additionally Change Native Compilation to consume these paths.
@brthor brthor force-pushed the native_subdirectory_support branch from 69adfc5 to 89de0c2 Compare January 4, 2016 22:43
@brthor
Copy link
Author

brthor commented Jan 5, 2016

@dotnet-bot test Ubuntu Debug Build please

@brthor
Copy link
Author

brthor commented Jan 5, 2016

@Sridhar-MS This centos error seems to be caused by an outdated stage0 package. Can I safely ignore this for now, or should I wait on it for the merge?

@Sridhar-MS
Copy link

@brthor Let me quickly create an updated stage0 for centos. Merging this at this point will fail all the PRs.

@Sridhar-MS
Copy link

@dotnet-bot test CentOS7.1 Debug Build please

@Sridhar-MS
Copy link

@dotnet-bot test CentOS7.1 Release Build please

@Sridhar-MS
Copy link

@brthor The CentOS builds are passing, go ahead with the merge. Meanwhile I am also setting up the internal CI to push latest CentOS tarballs to azure blob storage.

@brthor
Copy link
Author

brthor commented Jan 5, 2016

Excellent 👍

brthor added a commit that referenced this pull request Jan 5, 2016
Use subdirectories in publish for native
@brthor brthor merged commit 697e99e into dotnet:master Jan 5, 2016
wli3 pushed a commit to wli3/cli that referenced this pull request Jul 14, 2017
…tem-error-664

Show duplicate item errors due to implicit items in design-time builds
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants