Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support for compiling agains .NET 4.5 #85

Merged
merged 5 commits into from

2 participants

@Alxandr

Note that only the following 3 Projects has been tested as compiling with .NET 4.5:

  • Microsoft.Dynamic
  • Microsoft.Scripting
  • Microsoft.Scripting.Metadata
@jdhardy
Owner

I haven't looked at 4.5 in all that much detail, so forgive the basic questions. Why do we need a different build target for .NET 4.5? My understanding was that .NET 4 assemblies should "just work" on 4.5, so that we should be able to get away with just building for .NET 4, for now (and then switch to 4.5 in the future, much like "v2" is actually 3.5).

@Alxandr

The reason for a new build-target is basically just that they've added some more stuff to System.Dynamic for once. So there's a few duplicates of classes and such. This also makes it ... troublesome (and if I recall correctly, impossible depending on what classes from the DLR you use) to create your own language as a 4.5 assembly while linking against the 4.0 compiled DLR.

Though, it turned out to be a lot simpler than I thought to get it running in 4.5 (my language has "async/await" support, thus, doing it in 4.0 left a lot of the tools I wanted out).

@Alxandr Alxandr referenced this pull request from a commit in Alxandr/IronLanguages
@Alxandr Alxandr IronPython compiling agains v4.5
Pull #85
08be22a
@Alxandr

I've updated the few files required, and now "everything" compiles. The ones who don't are:

  • Microsoft.Scripting.Core - AFAIK this shouldn't be compiled if the target framework has System.Dynamic
  • Microsoft.Scripting.Silverlight - It has silverlight in the name, didn't try to compile it (didn't make sense to me)
  • sympl - Seems to be lacking basically all necessary references. Unchecked it in the compile-list (for the 2 new targets).
@Alxandr

However, CLR4 etc is not prefixed by FEATURE_, I just tried to copy the style that was used in the rest of the Solution.

@jdhardy
Owner
@Alxandr

In other words, you want it named FEATURE_CLR45?

Then how about the Win8 target? As you can see, in general, all PlatformSymbols do not have FEATURE_

  <PropertyGroup Condition="'$(ReferencedPlatform)' == 'V45'">
    <WpfReferences Condition="'$(WpfReferences)' == ''">$(SolutionDir)..\Util\References\WPF\4.0</WpfReferences>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <Features>FEATURE_OMMITED (too long)</Features>
    <PlatformSymbols>CLR4;CLR45</PlatformSymbols>
    <IsSilverlight>false</IsSilverlight>
    <IsFullFramework>true</IsFullFramework>
    <FeatureCoreDlr>true</FeatureCoreDlr>
  </PropertyGroup>

  <PropertyGroup Condition="'$(ReferencedPlatform)' == 'Win8'">
    <FrameworkReferences Condition="'$(FrameworkReferences)' == ''">$(SolutionDir)..\Util\References\Win8</FrameworkReferences>
    <NoStdLib>true</NoStdLib>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkIdentifier>.NETCore</TargetFrameworkIdentifier>
    <Features>FEATURE_OMMITED (too long)</Features>
    <PlatformSymbols>WIN8;CLR4;CLR45</PlatformSymbols>
    <IsSilverlight>false</IsSilverlight>
    <IsFullFramework>false</IsFullFramework>
    <FeatureCoreDlr>true</FeatureCoreDlr>
  </PropertyGroup>

Also note; I'm not complaining, or don't particular care too much either way, as long as it works, I just thought I'd point this out. If you want to name it FEATURE_CLR45, do you want to move it to the <Features>-tag? And also, I did not define the CLR45 symbol as you can see. It was already defined, I just used it.

@jdhardy
Owner

Sorry, I didn't really make myself clear. What I meant was, instead of having

#if WIN8 || CLR45

replace it with

#if FEATURE_GET_TYPE_CODE

And similar for other places. It makes it easier to keep track of which platforms have which features.

@Alxandr

Oh, right. I did that for the first one actually (FEATURE_GET_TYPE_INFO). Then I found the #if WIN8 and figured I'd just go with that.

Though, would you (or someone else in general) mind naming the features (just put them in the line-notes you already did), and I'll update the pull-request with them. I'm just horrible at naming stuff, and naming-conventions in general (and English's not my first language).

@jdhardy
Owner
@Alxandr

I've rebased the pull-request of the newest master, and updated some of the if-defs to FEATURE_. I'm unsure what to name the rest.

@jdhardy
Owner

I need to give it a try but I think including 4.5 as a separate platform should be fine.

@Alxandr

I have been unable to figure out (haven't used much time on it though) how to run the tests, so if somebody could either tell me how to do it, or run the tests against the debug45 and release45 targets, that'd be great.

@jdhardy
Owner
@Alxandr

I see. Well, as far as I can tell at least, everything is still working on the (debug|release)45 targets.

@jdhardy jdhardy referenced this pull request from a commit
@Alxandr Alxandr IronPython compiling agains v4.5
Pull #85
e993687
@jdhardy jdhardy merged commit 3da3033 into IronLanguages:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.