Skip to content
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

Add project name to the CoverletSourceRootsMapping file to avoid file locking #1320

Conversation

MarcoRossignoli
Copy link
Collaborator

fixes #1155

@MarcoRossignoli
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MarcoRossignoli
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zplan
Copy link

zplan commented May 20, 2022

Can someone of the contributers or authors look why this PR can not get in (@tonerdo ?).
I think a lot of people are waiting for this PR, including me : )

@MarcoRossignoli
Copy link
Collaborator Author

I'm working on it, but I'm bit busy atm.

@MarcoRossignoli
Copy link
Collaborator Author

You can dogfood the fix here for now #1155 (comment)

something weird with CI...

@MarcoRossignoli
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@MarcoRossignoli
Copy link
Collaborator Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@daveMueller
Copy link
Collaborator

Hi @MarcoRossignoli ,

so the issue is that after changing the sourceRootMappingFilePath, the InstrumenterHelper throws an exception when trying
to load the type of the tracker.

tracker = asm.GetTypes().Single(n => n.FullName.Contains("Coverlet.Core.Instrumentation.Tracker"));

The reason is that the tracker isn't injected (or not correct) into the assembly (coverlet.core.tests). It can't be found
with the code snipped above and thus Single(n => ...) throws an exception.

It's super weird that if changing the sourceRootMappingFilePath back to the way it was before, the tracker is injected in the
assembly again. I also can't reproduce this locally and it only happens on the build server.

Any idea what could cause the tracker to not beeing injected into the assembly?

@MarcoRossignoli
Copy link
Collaborator Author

But if we disable the coverage for our tests(we don't dogfood) does it work?

@daveMueller
Copy link
Collaborator

Not I tried this and it didn't help. Basically every unit test that is using TestInstrumentationHelper.Run<AwaitUsing> fails. If I remove all those tests (most of them are in coverlet.core.tests\Coverage) I can get build and the remaining test green.

@daveMueller
Copy link
Collaborator

The issue is that Coverlet.Core.Instrumentation.Tracker isn't injected into the assembly anymore and up to now I couldn't figure out why.

@MarcoRossignoli
Copy link
Collaborator Author

closed here #1456

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could not write lines to file CoverletSourceRootsMapping - in use by another process
3 participants