-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem:
When you run make serve it fails with numerous build errors. It doesn't matter if you do make serve pre-renaming or post-renaming.
Cause:
It depends on how you look at it. The issue seems to stem from treating warnings as errors. So if our standard is that every warning should be addressed via code fix, then the issue is broken code on master branch. If however, these particular warnings are the ones we don't care about, then the issue is them not being added .editorconfig, or treat warnings as errors tag not being removed from csproj file.
I don't know which case of the two this falls under, so I'm leaving the fixing to whoever has introduced the code that's breaking the build.
Terminal Logs:
myuser@mymachine: ~/path/baseapirepo $ make serve
docker-compose build base-api && docker-compose up base-api
Building base-api
Step 1/9 : FROM mcr.microsoft.com/dotnet/core/sdk:3.1
3.1: Pulling from dotnet/core/sdk
627b765e08d1: Pull complete
c040670e5e55: Pull complete
073a180f4992: Pull complete
bf76209566d0: Pull complete
c8b12c13e878: Pull complete
04285a380a49: Pull complete
4628003e4fdf: Pull complete
Digest: sha256:3b2ce647405e7308b67336797c7dc6e9ad55779c7631dff887c573beba4a6f81
Status: Downloaded newer image for mcr.microsoft.com/dotnet/core/sdk:3.1
---> f690885c9cb0
Step 2/9 : WORKDIR /app
---> Running in 785cd265d7c0
Removing intermediate container 785cd265d7c0
---> c50fed40b14a
Step 3/9 : COPY *.csproj ./
---> f25955269915
Step 4/9 : RUN dotnet restore
---> Running in a7686869ccc4
Determining projects to restore...
Restored /app/BaseApi.csproj (in 30.71 sec).
Removing intermediate container a7686869ccc4
---> 7e178d9b9ee2
Step 5/9 : COPY . ./
---> b86e8d89bb68
Step 6/9 : RUN dotnet build -c Release -o out
---> Running in 0cbf78ab5377
Microsoft (R) Build Engine version 16.7.2+b60ddb6f4 for .NET
Copyright (C) Microsoft Corporation. All rights reserved.
Determining projects to restore...
All projects are up-to-date for restore.
V1/Boundary/Response/ResponseObjectList.cs(10,37): error CA2227: Change 'ResponseObjects' to be read-only by removing the property setter. [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(5,18): error CA1032: Add the following constructor to TestOpsErrorException: public TestOpsErrorException(string message). [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(5,18): error CA1032: Add the following constructor to TestOpsErrorException: public TestOpsErrorException(string message, Exception innerException). [/app/BaseApi.csproj]
Versioning/ApiVersionExtensions.cs(9,24): error CA1062: In externally visible method 'string ApiVersionExtensions.GetFormattedApiVersion(ApiVersion apiVersion)', validate parameter 'apiVersion' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
Versioning/ApiVersionDescriptionExtensions.cs(9,24): error CA1062: In externally visible method 'string ApiVersionDescriptionExtensions.GetFormattedApiVersion(ApiVersionDescription apiVersionDescription)', validate parameter 'apiVersionDescription' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/CorrelationMiddleware.cs(19,17): error CA1062: In externally visible method 'Task CorrelationMiddleware.InvokeAsync(HttpContext context)', validate parameter 'context' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(7,47): error CA1303: Method 'TestOpsErrorException.TestOpsErrorException()' passes a literal string as parameter 'message' of a call to 'Exception.Exception(string? message)'. Retrieve the following string(s) from a resource table instead: "This is a test exception to test our integrations". [/app/BaseApi.csproj]
V1/Controllers/BaseController.cs(24,48): error CA1303: Method 'string BaseController.GetCorrelationId()' passes a literal string as parameter 'message' of a call to 'KeyNotFoundException.KeyNotFoundException(string? message)'. Retrieve the following string(s) from a resource table instead: "Request is missing a correlationId". [/app/BaseApi.csproj]
V1/Factories/EntityFactory.cs(15,22): error CA1062: In externally visible method 'Entity EntityFactory.ToDomain(DatabaseEntity databaseEntity)', validate parameter 'databaseEntity' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/Factories/EntityFactory.cs(26,22): error CA1062: In externally visible method 'DatabaseEntity EntityFactory.ToDatabase(Entity entity)', validate parameter 'entity' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
Startup.cs(186,23): error CA1062: In externally visible method 'void Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env)', validate parameter 'app' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
Build FAILED.
V1/Boundary/Response/ResponseObjectList.cs(10,37): error CA2227: Change 'ResponseObjects' to be read-only by removing the property setter. [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(5,18): error CA1032: Add the following constructor to TestOpsErrorException: public TestOpsErrorException(string message). [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(5,18): error CA1032: Add the following constructor to TestOpsErrorException: public TestOpsErrorException(string message, Exception innerException). [/app/BaseApi.csproj]
Versioning/ApiVersionExtensions.cs(9,24): error CA1062: In externally visible method 'string ApiVersionExtensions.GetFormattedApiVersion(ApiVersion apiVersion)', validate parameter 'apiVersion' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
Versioning/ApiVersionDescriptionExtensions.cs(9,24): error CA1062: In externally visible method 'string ApiVersionDescriptionExtensions.GetFormattedApiVersion(ApiVersionDescription apiVersionDescription)', validate parameter 'apiVersionDescription' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/CorrelationMiddleware.cs(19,17): error CA1062: In externally visible method 'Task CorrelationMiddleware.InvokeAsync(HttpContext context)', validate parameter 'context' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/UseCase/TestOpsErrorException.cs(7,47): error CA1303: Method 'TestOpsErrorException.TestOpsErrorException()' passes a literal string as parameter 'message' of a call to 'Exception.Exception(string? message)'. Retrieve the following string(s) from a resource table instead: "This is a test exception to test our integrations". [/app/BaseApi.csproj]
V1/Controllers/BaseController.cs(24,48): error CA1303: Method 'string BaseController.GetCorrelationId()' passes a literal string as parameter 'message' of a call to 'KeyNotFoundException.KeyNotFoundException(string? message)'. Retrieve the following string(s) from a resource table instead: "Request is missing a correlationId". [/app/BaseApi.csproj]
V1/Factories/EntityFactory.cs(15,22): error CA1062: In externally visible method 'Entity EntityFactory.ToDomain(DatabaseEntity databaseEntity)', validate parameter 'databaseEntity' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
V1/Factories/EntityFactory.cs(26,22): error CA1062: In externally visible method 'DatabaseEntity EntityFactory.ToDatabase(Entity entity)', validate parameter 'entity' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
Startup.cs(186,23): error CA1062: In externally visible method 'void Startup.Configure(IApplicationBuilder app, IWebHostEnvironment env)', validate parameter 'app' is non-null before using it. If appropriate, throw an ArgumentNullException when the argument is null or add a Code Contract precondition asserting non-null argument. [/app/BaseApi.csproj]
0 Warning(s)
11 Error(s)
Time Elapsed 00:00:04.51
ERROR: Service 'base-api' failed to build: The command '/bin/sh -c dotnet build -c Release -o out' returned a non-zero code: 1
make: *** [Makefile:11: serve] Error 1
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working