question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support a non script based entrypoint

See original GitHub issue
  • This issue is blocking
  • This issue is causing unreasonable pain

Following up on https://github.com/dotnet/aspnetcore/pull/21017#issuecomment-621915214.

Current state

Currently a repository build runs through these stages: build.cmd|sh --> eng/common/build.cmd|sh -> Arcade’s Build.proj -> Tools.proj, ProjectToBuild items, Sign.proj, Publish.proj.

To get into more details, Arcade’s Build.proj is current responsible for

  • Upfront restore: Invoking the restore target on Tools.proj and on the ProjectToBuild items.
  • Build the ProjectToBuild items (either a Solution File or msbuild project files)
  • Sign
  • Publish

With the current design, Arcade’s Build.proj file invokes the Restore and Build target on every passed in project which has multiple caveats:

  1. For every ProjectToBuild restore, NuGet is invoked. As a side note, in an internal thread it was discussed that the more often NuGet is invoked, the more likely the cross-org authentication plugin fails.
  2. Using the newly added NuGet static graph restore feature works best (and fastest) with a single restore entry point.
  3. Declaring dependencies between passed in ProjectToBuild items is difficult as you can either define BuildInParallel on all of them or on none.
  4. dotnet CLI verbs like dotnet build and dotnet restore don’t work on the repo root level.

dotnet/runtime

In dotnet/runtime we recently removed passing all our ProjectToBuild items to Arcade and instead added a root repo Build.proj entrypoint file which uses Microsoft.Build.Traversal which is then invoked by Arcade’s Build.proj file.

We additionally allow filtering on the Build.proj’s ProjectReferences based on the /p:Subset property.

In addition to the Build.proj entry point file, we have repo local SDK acquisition scripts in the repository root which bootstrap the dotnet SDK (via the Arcade scripts) and invoke it.

https://github.com/dotnet/runtime/blob/master/dotnet.cmd https://github.com/dotnet/runtime/blob/master/dotnet.sh

That combination allows us to run dotnet restore, dotnet build and dotnet test from the repository root. The caveat here is that Arcade’s Tools.proj, Sign.proj and Publish.proj files aren’t sequenced in if the repository’s Build.proj file is invoked directly.

Proposal

My ask is that we support an entrypoint in Arcade which avoids Arcade’s eng/common/build.cmd/sh and Build.proj files completely. This could be achieved via

  • a props/targets file import or
  • an auto detection feature in the Arcade SDK to add props/targets/ProjectReferences to the entry point project.
  • possible 99+ other solutions 😀

cc @markwilkie @tmat @dougbu @jeffkl @danmosemsft @ericstj

Recently Triaged Issues

All issues in this section should be triaged by the v-team into one of their business objectives or features.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Reactions:2
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
tmatcommented, Jul 6, 2020

We are now able to build Roslyn.sln in dev and PR validation (without producing VSIX) using dotnet build: https://github.com/dotnet/roslyn/pull/45589

0reactions
markwilkiecommented, Jul 16, 2020

This is a lot of disruptive work that will likely have a significant bug tail. Having said that, I do see how it could benefit dev workflow and thus am making it into an epic to contrast/compare with other dev workflow stuff…

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker entrypoint script fails to run
When you pass arguments after the image name, you are not modifying the entrypoint, but the command (CMD).
Read more >
Docker CMD vs ENTRYPOINT: What's The Difference & ...
They both specify programs that execute when the container starts running, but: CMD commands are ignored by Daemon when there are parameters ...
Read more >
Error when running Docker with entrypoint script in Linux VM
Any help is greatly appreciated, I am not sure what the error is except that the file cannot be found, though the file...
Read more >
Can I add an additional docker entrypoint script?
Any idea why in my case "$@" isn't working (exited with code 0), but when I manually pass "mysqld" as parameter enstead of...
Read more >
Best practices for writing Dockerfiles
Hints, tips and guidelines for writing clean, reliable Dockerfiles.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found