Skip to content
This repository has been archived by the owner on Dec 18, 2018. It is now read-only.

Remove dnx451 and dnxcore50 TFM's #518

Merged
merged 4 commits into from
Jan 12, 2016
Merged

Remove dnx451 and dnxcore50 TFM's #518

merged 4 commits into from
Jan 12, 2016

Conversation

henkmollema
Copy link
Contributor

@dnfclas
Copy link

dnfclas commented Dec 22, 2015

Hi @henkmollema, I'm your friendly neighborhood .NET Foundation Pull Request Bot (You can call me DNFBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!

The agreement was validated by .NET Foundation and real humans are currently evaluating your PR.

TTYL, DNFBOT;

@henkmollema
Copy link
Contributor Author

Meh, apparently it's not that simple..

@davidfowl
Copy link
Member

Looks like it might be the ICompileModule. We need to remove them.

@cesarblum
Copy link
Contributor

Did you check the code for any #if DNX451 or DNXCORE50?

@henkmollema
Copy link
Contributor Author

@CesarBS yeah there are some. I was trying to get rid of them but I got some vague errors in Microsoft.DNX.targets. I'll try again in a minute.

@henkmollema
Copy link
Contributor Author

@davidfowl / @CesarBS what to do with this guy:

var isDarwinMono =
#if DNX451
    IsWindows ? false : PlatformApis.IsDarwin;
#else
    false;
#endif

It's in Libuv.cs.

@halter73
Copy link
Member

Maybe this is the way to go?

return Type.GetType("Mono.Runtime") != null;

http://stackoverflow.com/a/721194/719967

Are you able to test if everything works on Mac OS X w/ Mono after this change?

@davidfowl
Copy link
Member

Use Microsoft.Extensions.PlatformAbstractions

@henkmollema
Copy link
Contributor Author

It builds after removing the StandardsPoliceCompileModule usage, so the problem lies in there. Perhaps because Microsoft.StandardsPolice still targets dnx451 and dnxcore50?

I'm not really sure how to test this correctly. Perhaps it's better if one of you guys take over?

@davidfowl
Copy link
Member

That sounds about right.

#else
false;
#endif
var isDarwinMono = !IsWindows && PlatformApis.IsDarwin;
Copy link
Member

Choose a reason for hiding this comment

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

This check isn't right though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I figured.. Not sure how to replace the #if DNX451.

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@henkmollema Do you plan on making the change to use RuntimeType?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Whoops, forgot about this one. Yes, I'll look into it right not.

/cc @davidfowl @halter73

@henkmollema
Copy link
Contributor Author

@halter73 @davidfowl updated it with PlatformServices. Is this correct now?

@henkmollema
Copy link
Contributor Author

And how about the StandardsPoliceCompileModule?

@halter73
Copy link
Member

halter73 commented Jan 7, 2016

Thanks. It looks good, but I'm not sure about removing StandardsPoliceCompileModule. Do you still get warnings for violations?

I'm going to look into it and get back to you.

@davidfowl
Copy link
Member

It's going to have to be removed as part of the move to the CLI.

@@ -24,12 +25,16 @@ static PlatformApis()
IsDarwin = string.Equals(GetUname(), "Darwin", StringComparison.Ordinal);
}
#endif

IsMono = PlatformServices.Default.Runtime.RuntimeType == "Mono";
Copy link
Member

Choose a reason for hiding this comment

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

👍

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we will need/be able to get rid of this check and the entire [DllImport("__Internal" hack once we move away from dnx. Users will have to install libuv on Mac when using Mono.

Copy link
Member

Choose a reason for hiding this comment

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

Yap

@henkmollema
Copy link
Contributor Author

Do you guys want me to do anything for this PR?

/cc @davidfowl / @halter73

@@ -1,6 +0,0 @@
namespace Microsoft.AspNet.Server.Kestrel
{
public class StandardsPoliceCompileModule : Microsoft.StandardsPolice.StandardsPoliceCompileModule
Copy link
Member

Choose a reason for hiding this comment

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

So we are no longer getting any warning from standards police after this is removed, but I see the issue you are running into. Having any .cs file in the compiler/preprocess folder is causing dnu build to fail with a null ref violation.

@davidfowl Any idea why this is happening now?

Copy link
Member

Choose a reason for hiding this comment

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

Because of the target framework changes. It can't find the right dependencies in the lock file. Null ref is bad but DNX is gone anyways.

We can turn this into an analyzer once we get support in the cli for that

@halter73 halter73 mentioned this pull request Jan 11, 2016
@halter73 halter73 merged commit b4b5f07 into aspnet:dev Jan 12, 2016
@halter73
Copy link
Member

Thanks!

@henkmollema
Copy link
Contributor Author

😄

@henkmollema henkmollema deleted the projectjson branch January 12, 2016 20:41
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.

6 participants