Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Move S.IO.FileAccess to corelib.#12206

Merged
alexperovich merged 23 commits intodotnet:masterfrom
alexperovich:resources
Oct 5, 2016
Merged

Move S.IO.FileAccess to corelib.#12206
alexperovich merged 23 commits intodotnet:masterfrom
alexperovich:resources

Conversation

@alexperovich
Copy link
Copy Markdown
Member

This enum is used by UnmanagedMemoryStream which is required for ResourceManager.GetStream()

Fixes #12169

<TargetingPackReference Include="mscorlib" />
</ItemGroup>
<ItemGroup Condition="'$(TargetGroup)' != 'net46'">
<Compile Include="System\IO\FileAccess.cs" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If nothing else still uses the file, it should be deleted, too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Deleted

@alexperovich
Copy link
Copy Markdown
Member Author

@weshaggard

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />
<ItemGroup>
<TargetingPackReference Include="mscorlib" />
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This change is going to clash with #12187, where @jkotas is moving everything to build against System.Private.CoreLib.

<AssemblyName>System.IO.FileSystem.Primitives</AssemblyName>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net46'">true</IsPartialFacadeAssembly>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
<NuGetTargetMoniker Condition="'$(TargetGroup)' == ''">.NETStandard,Version=v1.3</NuGetTargetMoniker>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You need to bump the assembly version and the target framework. for this library. See my docs which are still in PR #12036, and please add feedback to that PR if you have further questions.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I have bumped the versions

Copy link
Copy Markdown
Member

@weshaggard weshaggard left a comment

Choose a reason for hiding this comment

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

Need to version.

This enum is used by UnmanagedMemoryStream which is required for ResourceManager.GetStream()

Fixes #12169
@alexperovich
Copy link
Copy Markdown
Member Author

@weshaggard PTAL

<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<ItemGroup>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj"/>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@joperezr this will conflict with your PR.

<ItemGroup>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj"/>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj">
<TestTFMs>netcore50;net46</TestTFMs>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why did you remove the netcore50 test configuration? I would expect we should still make sure we test that configuration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll put it back.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Moreover, why'd you change this at all?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I didn't catch this when I changed this back. Will fix.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should still keep netcore50 as a TestTFM.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Which would mean you still need a netstandard1.3 build configuration for this project.

<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.0.2.0</AssemblyVersion>
<AssemblyVersion>4.0.3.0</AssemblyVersion>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We generally bump minor versions but this is just moving one type down. @ericstj what is your thoughts on version bumping in this case?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If all that was changed was impl then we don't need to change version at all (I typically do that at the start of a release).

@alexperovich
Copy link
Copy Markdown
Member Author

@dotnet-bot test Innerloop Ubuntu14.04 Release Build and Test please (Build Timeout)

<Project Include="System.IO.FileSystem.Primitives.Tests.csproj">
<TestTFMs>netcore50;net46</TestTFMs>
<TargetGroup>netstandard1.7</TargetGroup>
<TestTFMs>netcoreapp1.1</TestTFMs>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks like @joperezr PR got in before yours. Can you please adjust this .builds file and csproj such that the netstandard1.7 is the default configuration. See #12241 as an example

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Sure

"netstandard1.7": {}
},
"supports": {
"coreFx.Test.netcore50": {},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You will need to also add back this "coreFx.Test.netcore50" section otherwise it will not run for the netcore50 configuration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I put it back

@alexperovich
Copy link
Copy Markdown
Member Author

@dotnet-bot test Innerloop CentOS7.1 Debug Build and Test please (disk IO issue)

@alexperovich
Copy link
Copy Markdown
Member Author

@dotnet-bot test Innerloop CentOS7.1 Release Build and Test please (disk IO issue)

"imports": [
"dotnet5.4"
]
"Microsoft.TargetingPack.Private.CoreCLR": "1.2.0-beta-24603-02"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"Microsoft.TargetingPack.Private.CoreCLR": "1.2.0-beta-24603-02" [](start = 8, length = 64)

Why did we make this change to bind to coreclr instead of going through System.Runtime like we did before?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This change is necessary because UnmanagedMemoryStream has a ctor that takes a FileAccess enum and ResourceManager depends on UnmanagedMemoryStream. All of these types need to be in corelib.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Does this not cause warnings with other duplicated types coming from System.Private.CoreLib?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It does not.

<ItemGroup>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj"/>
<Project Include="System.IO.FileSystem.Primitives.Tests.csproj">
<TestTFMs>netcore50;net46</TestTFMs>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Moreover, why'd you change this at all?

@alexperovich
Copy link
Copy Markdown
Member Author

/cc @ianhays

"coreFx.Test.net46": {},
"coreFx.Test.net461": {},
"coreFx.Test.net462": {},
"coreFx.Test.netcoreapp1.1": {},
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was this required?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is required because netcoreapp1.1 is the default TestTFM now and the project file doesn't change that.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

But now if someone what's to run this on net46-net462 they can't?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file is unchanged now

<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'net46_Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot_Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcore50aot_Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)' == ''">
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nit: can you please include with the other reference below.

<TargetGroup>net46</TargetGroup>
</Project>
<Project Include="System.IO.FileSystem.Primitives.csproj">
<TargetGroup>netcore50aot</TargetGroup>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think this needs to be netcore50

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Changed

<ProjectGuid>{6C05678E-394C-4CFF-B453-A18E28C8F2C3}</ProjectGuid>
<AssemblyName>System.IO.FileSystem.Primitives</AssemblyName>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' == 'net46'">true</IsPartialFacadeAssembly>
<IsPartialFacadeAssembly Condition="'$(TargetGroup)' != 'netcore50aot'">true</IsPartialFacadeAssembly>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

netcore50?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not think we should be bothering with keeping the netcore50 build live. Delete it instead - it is what we are doing everywhere else.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We cannot remove this netcore50 build. This package was portable and now is not portable to .net native.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I do not understand. If we remove it, the package will still contain the repackaged netcore50 binary. There are many cases like this already.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

There isn't a netcore50 binary in the previous stable package

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Then just bump the default build to netstandard1.7 like I am doing it here: #12187.

@alexperovich
Copy link
Copy Markdown
Member Author

@dotnet-bot test this please

@alexperovich
Copy link
Copy Markdown
Member Author

@dotnet-bot test Innerloop Ubuntu14.04 Debug Build and Test please (Build Timeout)

<OutputType>Library</OutputType>
<AssemblyName>System.IO.FileSystem.Primitives.Tests</AssemblyName>
<NugetTargetMoniker>.NETStandard,Version=v1.3</NugetTargetMoniker>
<NugetTargetMoniker>.NETStandard,Version=v1.7</NugetTargetMoniker>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Once you add the netstandard1.3 build configuration you will need to conditions this on an empty targetgroup.

@alexperovich alexperovich merged commit 8a0f80e into dotnet:master Oct 5, 2016
@alexperovich alexperovich deleted the resources branch October 5, 2016 20:33
@karelz karelz modified the milestone: 1.2.0 Dec 3, 2016
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Move S.IO.FileAccess to corelib.

This enum is used by UnmanagedMemoryStream which is required for ResourceManager.GetStream()

Fixes dotnet/corefx#12169

* Fix Dependencies

* Delete FileAccess.cs

* Bump Versions

* Fix test configurations

* Update dependencies

* Fix dependencies

* Add back netcore50 test TFM

* Update dependency versions

* Make netcoreapp1.1 the default test tfm

* Update dependencies

* Update based on feedback from @ericstj

* Remove unneeded changes in tests

* Change test TFM to net46

* Reorder items and change netcore50aot to netcore50

* Remove a left behind aot

* Remove netcoreapp1.1 from test project.json

* Fix dependencies

* Retarget to ns1.7

* Update package index

* Test on netstandard1.3


Commit migrated from dotnet/corefx@8a0f80e
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.

8 participants