-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Use repository root for output path calculation when the output isn't a child of the working directory #9805
Open
baronfel
wants to merge
11
commits into
main
Choose a base branch
from
use-sourceroot-for-relative-paths
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+300
−42
Open
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
66547b5
wip
baronfel 5c5a0a2
wip
baronfel 4920101
correct display
baronfel a67aec2
compute relative paths from working directory to source root
baronfel 3d906ae
simplfy output path creation
baronfel 2c5c0b7
use strings instead of spans because Path APIs are pushing us that way
baronfel a0f9e5c
Detect and generate full paths if requested
baronfel f924f49
use FileInfo/DirectoryInfo to check path relationships instead of raw…
baronfel d1182fd
WIP use ProjectEvaluationFinishedEventArgs to read GenerateFullPaths …
baronfel 1b72331
Introduce a cache of Evaluation data that is looked up
baronfel 5a41571
also do nuget package output detection
baronfel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
internal sealed class EvaluationData | ||
{ | ||
/// <summary> | ||
/// Captures data that comes from project evaluation, is assumed to not change through execution, | ||
/// and is referenced for rendering purposes throughout the execution of the build. | ||
/// </summary> | ||
/// <param name="targetFramework"></param> | ||
public EvaluationData(string? targetFramework) | ||
{ | ||
TargetFramework = targetFramework; | ||
} | ||
|
||
/// <summary> | ||
/// The target framework of the project or null if not multi-targeting. | ||
/// </summary> | ||
public string? TargetFramework { get; } | ||
|
||
/// <summary> | ||
/// This property is true when the project would prefer to have full paths in the logs and/or for processing tasks. | ||
/// </summary> | ||
/// <remarks> | ||
/// There's an MSBuild property called GenerateFullPaths that would be a great knob to use for this, but the Common | ||
/// Targets set it to true if not set, and setting it to false completely destroys the terminal logger output. | ||
/// That's why this value is hardcoded to false for now, until we define a better mechanism. | ||
/// </remarks> | ||
public bool GenerateFullPaths { get; } = false; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: You've removed the
TargetFramework
property.