reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rogan Carr <rogan.c...@gmail.com>
Subject Re: REEF-1822: Create a script to analyze CLR Compliance
Date Thu, 20 Jul 2017 01:51:04 GMT
Hi Scott,

It does run if I build without the RuntimeIdentifiers, using `dotnet run`.

Best,
Rogan


On Jul 19, 2017 18:16, "Scott Inglis" <msinglft@gmail.com> wrote:

Can you try building this code as a .net standard library to see if that
still compiles? You will need to remove the RuntimeIdentifiers.

I don't fully understand why, but GetTypeInfo is required if you are
building the code as a .net standard library.


On Wed, Jul 19, 2017 at 5:40 PM, Rogan Carr <rogan.carr@gmail.com> wrote:

> Hi All,
>
> I think I found an issue with our "CoreCLR Issues". For executables, we
> check for compatibility with
> - .NET Core + Platform Extensions, Version=1.0
> - .NET Framework, Version=4.5.1
>
> However, I can build and run DotNet 2.0 applications that violate ".NET
> Core + Platform Extensions, Version=1.0" but still run on Windows and
> Linux. Is this correct?
>
> I put an example below.
>
> Best,
> Rogan
>
> example violating ".NET Core + Platform Extensions, Version=1.0" that runs
> on Linux
>
> 1. `dotnet new console`
> 2. Edit the CSProj, adding
> ```
>   <PropertyGroup>
>     <RuntimeIdentifiers>win10-x64;ubuntu.14.04-x64</RuntimeIdentifiers>
>   </PropertyGroup>
> ```
>
> 3. Edit the Program.cs
>
> ```
> using System;
> using System.Reflection;
>
> namespace DotNet
> {
>     class Program
>     {
>         static void Main(string[] args)
>         {
>             Console.WriteLine("Hello World!");
>             Type myType = typeof(int);
>
>             string assemblyName = typeof(int).Assembly.GetName().Name; //
> This is an issue for ".NET Core + Platform Extensions, Version=1.0"
>
>             // This is the fix for the issue
>             //string assemblyName =
> typeof(int).GetTypeInfo().Assembly.GetName().Name;
>             Console.WriteLine($"The assemblyname of {myType.FullName} is
> {assemblyName}");
>         }
>     }
> }
> ```
> 4. `dotnet restore`
> 5. `dotnet build`
> 6. `dotnet publish -c Release -r win10-x64`
> 7. `dotnet publish -c Release -r ubuntu.14.04-x64`
>
> Now, the Windows exe and the ubuntu binary run just fine
>
> On Fri, Jul 7, 2017 at 7:56 PM, Markus Weimer <markus@weimo.de> wrote:
>
> > OMG! The first contribution to get extra credit from Mariia! Congrats,
> > Rogan! :-) -- Markus
> >
> > On Fri, Jul 7, 2017 at 3:42 PM, Rogan Carr <rogan.carr@gmail.com> wrote:
> > > Hi Mariia,
> > >
> > > I wrote a simple PowerShell script and created a PR for it:
> > > https://github.com/apache/reef/pull/1325
> > >
> > > I think that we should be able to use this in AppVeyor --it's pretty
> > > standalone, and it can install its dependencies automatically.
> > >
> > > Best,
> > > Rogan
> > >
> > > On Fri, Jul 7, 2017 at 3:27 PM, Mariia Mykhailova <
> > > mamykhai@microsoft.com.invalid> wrote:
> > >
> > >> Yes, absolutely please do it!
> > >>
> > >> Extra credit if this tool can be executed by AppVeyor (as a separate
> job
> > >> maybe, or as part of the regular build process on all jobs) to show
> > >> information about CLR compliance as part of continuous integration
> > >>
> > >> -Mariia
> > >>
> > >> -----Original Message-----
> > >> From: Rogan Carr [mailto:rogan.carr@gmail.com]
> > >> Sent: Friday, July 7, 2017 3:21 PM
> > >> To: dev@reef.apache.org
> > >> Subject: REEF-1822: Create a script to analyze CLR Compliance
> > >>
> > >> Hi All,
> > >>
> > >> I have been analyzing the REEF.NET codebase for CoreCLR compliance,
> > and I
> > >> thought it might be nice to have a script that checked the build for
> > >> compliance with the various CLR runtimes that we want to target.
> > >>
> > >> This would make debugging CLR compatibility issues a lot quicker, and
> it
> > >> would encode the knowledge of the requirements into code.
> > >>
> > >> Thoughts?
> > >>
> > >> Best,
> > >> Rogan
> > >>
> > >> [1] https://na01.safelinks.protection.outlook.com/?url=
> > >> https%3A%2F%2Fissues.apache.org%2Fjira%2Fbrowse%2FREEF-
> > >> 1822&data=02%7C01%7Cmamykhai%40microsoft.com%
> > >> 7Ce714fbbd9ab3444def6708d4c5867e4b%7C72f988bf86f141af91ab2d7cd011
> > >> db47%7C1%7C0%7C636350628815960509&sdata=8er51sMsHETEMTmC%
> > >> 2Bc1Qab3wzqtxhgtlB9AgAZzTsvw%3D&reserved=0
> > >>
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message