-
Notifications
You must be signed in to change notification settings - Fork 252
[Spec] Warnings and errors in the assets file
Ankit Mishra edited this page May 3, 2017
·
12 revisions
Restore and Build generate duplicate warnings and errors in some scenarios. To improve this restore should log messages to the assets file where they can be de-duplicated with build.
Adding messages to the assets file also improves the scenario where a user builds in a different session, possibly days after doing the restore. If the restore failed build could display the original failure messages from restore to help the user debug the problem.
var format = new LockFileFormat();
public interface IAssetsLogMessage
{
/// <summary>
/// Level to indicate if this is an error or wanring.
/// </summary>
LogLevel Level { get; }
/// <summary>
/// Indicates the NuGet error code.
/// </summary>
NuGetLogCode Code { get; }
/// <summary>
/// Indicates the staring generated by the code to go with the error code.
/// </summary>
string Message { get; }
/// <summary>
/// Indicates the date time at which the error occurred.
/// </summary>
DateTimeOffset Time { get; }
/// <summary>
/// Indicates the project for which the error was thrown.
/// </summary>
string ProjectPath { get; }
/// <summary>
/// Level to indicate the warning level for the message.
/// This is relevant only if the Level == LogLevel.Warning.
/// </summary>
WarningLevel WarningLevel { get; }
/// <summary>
/// Indicates the file for which the error was thrown.
/// </summary>
string FilePath { get; }
/// <summary>
/// Indicates the starting line for which the error was thrown.
/// </summary>
int StartLineNumber { get; set; }
/// <summary>
/// Indicates the starting column for which the error was thrown.
/// </summary>
int StartColumnNumber { get; set; }
/// <summary>
/// Indicates the ending line for which the error was thrown.
/// </summary>
int EndLineNumber { get; set; }
/// <summary>
/// Indicates the ending column for which the error was thrown.
/// </summary>
int EndColumnNumber { get; set; }
/// <summary>
/// Project or Package Id
/// </summary>
string LibraryId { get; set; }
/// <summary>
/// List of TargetGraphs
/// </summary>
IReadOnlyList<string> TargetGraphs { get; set; }
}
Check out the proposals in the accepted
& proposed
folders on the repository, and active PRs for proposals being discussed today.