Skip to content
This repository has been archived by the owner on Apr 16, 2020. It is now read-only.

git submodule support #228

Closed
borrrden opened this issue Jul 29, 2017 · 3 comments
Closed

git submodule support #228

borrrden opened this issue Jul 29, 2017 · 3 comments
Milestone

Comments

@borrrden
Copy link

One of the issues I'm facing with this otherwise wonderful git source link generator is that it will only check the root git repo for source files. However, I have a project that pulls a shared project from a submodule and so all those files cannot be found. If I manually set up sourcelink.json, then I can get those URLs to work but there is no line ending magic done. Is there a way, or likely to be a way, to specify in a similar way two different repos for sourcelink-git to use based on filepath like the sourcelink.json file itself?

@borrrden
Copy link
Author

I've actually been able to do this work myself, with one small problem...I have everything working well to check submodules for source if the files cannot be found in the main repo, and to emit the sourcelink.json with URLs corresponding to the commits in the main git index but for some reason when I build and check all the files are using the main URL....

e.g.

{
	"documents": {
		"D:\\Development\\couchbase-lite-net-2\\*": "https://raw.githubusercontent.com/couchbase/couchbase-lite-net/e150e49cc939d46a300ae7fcc0310ae26f6061e3/*",
		"D:\\Development\\couchbase-lite-net-2\\vendor\\couchbase-lite-core\\*": "https://raw.githubusercontent.com/couchbase/couchbase-lite-core/7f3fe0d323243b4ba799e11e97df79f507e51322/*"
	}
}

According to the docs:

Source Link JSON may contain multiple relative and/or absolute mappings in any order. They will be resolved in order from most specific to least specific.

However, the result is that all of them are using the top URL...and dotnet sourcelink test reports abotu 80 of these errors:

b50632ffc6e41c1bc516aef205cb8e305292d84b sha1 csharp D:\Development\couchbase-lite-net-2\vendor\couchbase-lite-core\CSharp\src\LiteCore.Shared\Interop\NativeHandler.cs
https://raw.githubusercontent.com/couchbase/couchbase-lite-net/e150e49cc939d46a300ae7fcc0310ae26f6061e3/vendor/couchbase-lite-core/CSharp/src/LiteCore.Shared/Interop/NativeHandler.cs

I swear I had it working when I did things manually but I've been over the source and I don't see anything preventing it...

@borrrden
Copy link
Author

Ok I opened pull request #229

@ctaggart ctaggart added this to the 3.0.0 milestone Nov 15, 2017
@ctaggart ctaggart changed the title Submodule support? git submodule support Jan 7, 2018
@ctaggart
Copy link
Owner

ctaggart commented Jun 8, 2018

This is supported by https://github.com/dotnet/sourcelink/

@ctaggart ctaggart closed this as completed Jun 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants