Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reorganize dependencies and infrastructure for ACS #2278

Merged
merged 26 commits into from
Jun 17, 2024

Conversation

pgrawehr
Copy link
Contributor

@pgrawehr pgrawehr commented Feb 11, 2024

Make sure the release build only uses the official package, so that it can be used in client applications that don't build Iot.Device.Common from scratch. Due to the way the compiler works, the client application must be built against the exactly same library the compiler itself is built.

Also updates some test settings

Microsoft Reviewers: Open in CodeFlow

@pgrawehr pgrawehr force-pushed the CompilerAsTool branch 4 times, most recently from d7845cd to 2e6a662 Compare February 18, 2024 19:23
@pgrawehr pgrawehr marked this pull request as ready for review March 13, 2024 20:32
@joperezr joperezr self-assigned this Mar 21, 2024
.gitignore Outdated Show resolved Hide resolved
build.proj Show resolved Hide resolved
@pgrawehr
Copy link
Contributor Author

pgrawehr commented Apr 9, 2024

@joperezr Added extra notices as discussed.

@pgrawehr pgrawehr requested a review from joperezr April 18, 2024 15:09
<Authors>The .NET Foundation community</Authors>
<NeutralLanguage>en</NeutralLanguage>
<IsPackable>True</IsPackable>
<PackAsTool>True</PackAsTool>
Copy link
Member

Choose a reason for hiding this comment

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

We should also make sure that this tool stays in preview and doesn't go stable (since it is experimental). You can accomplish that by adding the property: <SuppressFinalPackageVersion>true</SuppressFinalPackageVersion> in the .csproj. This way, even when the rest of the repo builds stable packages, this tool will remain as prerelease.

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 did that, but it doesn't seem to do anything. Can you verify with a release build?

Copy link
Member

@joperezr joperezr left a comment

Choose a reason for hiding this comment

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

Left a few comments/questions, but looks good overall.

pgrawehr added 2 commits May 26, 2024 13:19
Better keep the low version as long as this
is experimental
@pgrawehr
Copy link
Contributor Author

/azp run dotnet.iot

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@joperezr joperezr self-requested a review June 13, 2024 19:00
@joperezr
Copy link
Member

Ok, so I now understand why the build is still producing stable packages even when you applied the property, looks like all projects under tools (and turns out also the ones under devices) aren't using Arcade at all, and I'm working on some changes on top of your PR to fix that but that is unblocking a can of worms unfortunately. I'll be able to push some changes soon, but we may want to reconsider holding the release for this as this would introduce risk as I'm essentially changing how all of these things are built.

@joperezr
Copy link
Member

cc @pgrawehr ^^

@@ -9,20 +9,44 @@
<AssemblyName>acs</AssemblyName>
Copy link
Member

Choose a reason for hiding this comment

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

I just noticed this project is targeting net6.0, why is that? Should it be net8.0 instead? net6.0 is out of support so we'd want to update that now.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The entire library still targets 6.0, so this is consistent. But more importantly is the fact that the runtime used affects the compilation. Because acs relies heavily on the internal runtime implementations (eg the native methods called) updating this requires considerable effort and testing.

So this is something for a future update (I'm looking into a slightly different approach there, though)

<ToolCommandName>dotnet-acs</ToolCommandName>
<PackageOutputPath>..\..\..\artifacts\packages\$(Configuration)\Shipping</PackageOutputPath>
<Version>1.0.2</Version>
<!-- Stay in beta mode -->
Copy link
Member

Choose a reason for hiding this comment

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

I used the version you were using, but is there a reason why we are shipping 1.0.2 if we have never shipped a stable 1.0.0? Should we move this back to 1.0.0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We never shipped older releases, but one could build them manually. But I don't have a strong feeling on this.

@joperezr
Copy link
Member

joperezr commented Jun 13, 2024

Ok, so did a whole bunch of changes in 36afdf7 to fix tools and devices directories not using Arcade to build. From that, I started getting a bunch of style and analyzer errors, so that's all of the changes in the *.cs files, mainly addressing those.

@pgrawehr could you pull my changes and build locally and validate everything looks good to you? If you want to do a local "Official stable build" you can run build.cmd -pack -ci /p:OfficialBuildId=20240613.99 /p:DotnetFinalVersionKind=Release which should generate stable versions of packages, except for acs package, that should stay unstable.

@pgrawehr
Copy link
Contributor Author

@joperezr Not good. The build now fails with

D:\a\1\s\.dotnet\sdk\7.0.403\Sdks\NuGet.Build.Tasks.Pack\build\NuGet.Build.Tasks.Pack.targets(221,5): error NU5017: Cannot create a package that has no dependencies nor content. [D:\a\1\s\tools\ArduinoCsCompiler\Frontend\Frontend.csproj]

That package shouldn't be empty...

@joperezr
Copy link
Member

Oh interesting, not sure why I didn't see that locally. That is because it is trying to create a symbol package (as that is the default on the repo) and this is a tool package. My latest commit should fix that.

@joperezr
Copy link
Member

I do still think we should retarget the tool and have it target 8.0

@joperezr
Copy link
Member

Not sure why the GH action is failing though, I think for that one it's best if you take a peek.

@pgrawehr
Copy link
Contributor Author

Not sure why the GH action is failing though, I think for that one it's best if you take a peek.

That happened because the location of the bin folder has changed. Previously, the bin folders where below the projects, now they're all below the artifacts folder. Thus the build script was not able to find the binaries to execute.

@pgrawehr
Copy link
Contributor Author

I do still think we should retarget the tool and have it target 8.0

Have you read my comment above? I quickly tried, and it doesn't even build, because the entire project still builds using .NET 7.0 (see global.json). I really wouldn't do such an update as part of this PR.

@joperezr
Copy link
Member

Oh missed that. Yeah I agree, let's get this merged then and I can put up a follow up PR that moves us to 8.0 infra

@pgrawehr
Copy link
Contributor Author

@joperezr Can you do the merge? I cannot, because the helix build keep failing. We really need to do something about this unstable ADC test.

@joperezr joperezr merged commit 6df4dc4 into dotnet:main Jun 17, 2024
7 of 10 checks passed
@joperezr
Copy link
Member

We should just disable that test as it is not good to setup a pattern to merge on red.

@github-actions github-actions bot locked and limited conversation to collaborators Jul 19, 2024
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.

2 participants