GithubHelp home page GithubHelp logo

Comments (10)

rainersigwald avatar rainersigwald commented on July 29, 2024

Configuring the compiler to emit absolute paths as here did not resolve the problem.

from setup-dotnet.

damccorm avatar damccorm commented on July 29, 2024

@ericsciple could you take a look? It looks to me like the regex should match this so I'm not totally sure why we're seeing this behavior.

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

@rainersigwald sorry i didnt see this issue before now.

The relative path not lining up makes sense. The runner attempts to root relative paths to the repo root, and if that path doesnt exist then the file property gets dropped.

iirc the runner sets an environment variable github=true, so defaulting to absolute when that is set, might be something to consider.

However, I am surprised that emitting absolute paths did not resolve the problem. As long as the path is under the repo root, that should work. Thanks for the links, i'll fork your repro and play around with it.

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

@ZEisinger looking at the matcher for v1, it looks like it should look something more like this:

"pattern": [
  {
    "regexp": "^\\s*([^:]+)\\((\\d+),(\\d+)\\): (error|warning) ([^:]+): (.*) \\[(.+)\\]$",
    "file": 1,
    "line": 2,
    "column": 3,
    "severity": 4,
    "code": 5,
    "message": 6,
    "fromPath": 7
  }
]

frompath will root the relative file

also i noticed location isnt a thing, so line/column instead

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

...although the annotation still didnt come out correct... debugging the runner now

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

@ZEisinger I opened a pr to fix fromPath in the runner. There is a bug in the runner where it currently does not trim the file name (csproj) before rooting the file. I'll sync w/ folks tomorrow to get a better idea when we can roll the fix out to prod.

You may not want to update the matcher configuration to include fromPath, until the runner fix is deployed.

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

The runner has rolled out everywhere now and the fromPath field can be used. Sorry for the delay we had a freeze for a while and was waiting for the new runner to roll out.

from setup-dotnet.

ericsciple avatar ericsciple commented on July 29, 2024

@ZEisinger i'm unable to assign a different assignee. The runner changes are in now.

from setup-dotnet.

StanleyGoldman avatar StanleyGoldman commented on July 29, 2024

I tested against this regex: https://regex101.com/r/MkisH3/4

from setup-dotnet.

rainersigwald avatar rainersigwald commented on July 29, 2024

@StanleyGoldman Thanks! I updated my test PR to use the latest master and everything looks good with and without configuring MSBuild to emit absolute paths.

from setup-dotnet.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.