dotnet / dotnet/sourcelink

Build time Source Link doesn't understand git submodule URL with "@", which is used by AzDO UI.

Open
#877 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.4k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

We have a repo with a submodule with a url in the form of `@dev.azure.com///<_git>/`. In the .gitmodules file it appears as this:

```
[submodule ""]
path = ...
url = https://@dev.azure.com///_git/
...
```

The main repo is also Azure Dev Ops, and references ``.

After the submodule is restored, `Microsoft.SourceLink.Vsts.Git` doesn't understand the submodule URL and produces the following build error:
`.nuget\packages\microsoft.sourcelink.common\1.0.0-beta-63127-02\build\Microsoft.SourceLink.Common.targets(40,5): error : SourceRoot.SourceLinkUrl is empty: ''`

The specified URL was originally used because it is shown in the Azure Dev Ops "clone repo" UI:
![image](https://user-images.githubusercontent.com/6598594/191096811-9a3040b9-cbf2-42b0-86c4-f0bfc5570d84.png)

Changing the submdoule URL to a `.visualstudio.com` style URL resolves the issue.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.