Closed louwers closed 4 months ago
Compared to main
FILE SIZE VM SIZE
-------------- --------------
-0.0% -552 [ = ] 0 TOTAL
Just in case anyone else has the same problem, I'm encountering an error, I think related to this change of submodule.
I started seeing an error when updating:
~/src/maplibre/maplibre-native$ git submodule update
fatal: remote error: upload-pack: not our ref 8ad3bf0b78bf9cb0dba0abaccec0c180e1c27ab3
fatal: Fetched in submodule path 'vendor/vector-tile', but it did not contain 8ad3bf0b78bf9cb0dba0abaccec0c180e1c27ab3. Direct fetching of that commit failed.
If you're hitting that error, I think the fix could be:
cd vendor/vector-tile && git remote set-url origin https://github.com/maplibre/mvt-cpp.git
Here's my debug steps in case it's interesting to anyone...
I don't really know enough about git submodules, but:
$ cd vendor/vector-tile
$ git remote -v
origin https://github.com/mapbox/vector-tile.git (fetch)
origin https://github.com/mapbox/vector-tile.git (push)
It's still referencing the old remote!
Sanity check that I have the up-to-date .gitmodule
$ cat .gitmodules| grep -A1 vector-tile
[submodule "vendor/vector-tile"]
path = vendor/vector-tile
url = https://github.com/maplibre/mvt-cpp.git
Ok, .gitmodules looks good. Maybe it's cached in the .git/config? TBH I don't really know the practical difference.
$ cat .git/config| grep -A3 vector-tile
[submodule "vendor/vector-tile"]
active = true
url = https://github.com/mapbox/vector-tile.git
Yep! The .git/config has the old entry. So maybe I need to manually delete that entry from .git/config and re-initialize?
$ vim .git/config # delete entry for vector-tile
$ git submodule update --init
Submodule 'vendor/vector-tile' (https://github.com/maplibre/mvt-cpp.git) registered for path 'vendor/vector-tile'
fatal: remote error: upload-pack: not our ref 8ad3bf0b78bf9cb0dba0abaccec0c180e1c27ab3
fatal: Fetched in submodule path 'vendor/vector-tile', but it did not contain 8ad3bf0b78bf9cb0dba0abaccec0c180e1c27ab3. Direct fetching of that commit failed.
Huh! It's still failing. It recloned the submodule with the stale remote.
So I gave up.
cd ..
rm -fr maplibre-native
git clone https://github.com/maplibre/maplibre-native
cd maplibre-native
git submodule update --init --recursive
In hindsight, I probably could have manually set the new remote vendor/vector-tile.
But I was expecting the client to be able to infer this automatically based on the changes to .gitmodules. Maybe there's a reason it's manual that I don't understand.
$ git --version
git version 2.46.0
@michaelkirk Thanks for sharing your struggles. Submodules can be a pain...
Updates the vector-tile vendored dependency to use the MapLibre fork hosted at https://github.com/maplibre/mvt-cpp
Includes a commit cherry-picked by @nathreed https://github.com/maplibre/mvt-cpp/pull/2
Closes https://github.com/maplibre/maplibre-native/issues/795
Also some progress towards https://github.com/maplibre/maplibre-native/issues/2227