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

Update vector-tile to MapLibre fork #2460

Merged
merged 2 commits into from
Jun 3, 2024

Conversation

louwers
Copy link
Collaborator

@louwers louwers commented Jun 3, 2024

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 maplibre/mvt-cpp#2

Closes #795

Style Metric mvt-cpp vector-tiles
Americana avgEncodingTime 13.0449364383 13.9205717752
Americana low1pEncodingTime 59.4919468571 63.3725865995
Americana avgRenderingTime 12.2574985444 12.8400150678
Americana low1pRenderingTime 37.3708819947 36.2964980954

Also some progress towards #2227

@louwers louwers added bug Something isn't working dependencies Pull requests that update a dependency file cpp-core labels Jun 3, 2024
@louwers louwers self-assigned this Jun 3, 2024
Copy link

github-actions bot commented Jun 3, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  -0.0%    -552  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2460-compared-to-main.txt

@louwers louwers merged commit c961eb0 into maplibre:main Jun 3, 2024
31 of 32 checks passed
@louwers louwers deleted the update-vector-tile branch June 3, 2024 16:27
acalcutt pushed a commit to WifiDB/maplibre-native that referenced this pull request Jun 4, 2024
acalcutt added a commit to WifiDB/maplibre-native that referenced this pull request Jun 4, 2024
@michaelkirk
Copy link

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

@louwers
Copy link
Collaborator Author

louwers commented Aug 20, 2024

@michaelkirk Thanks for sharing your struggles. Submodules can be a pain...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cpp-core dependencies Pull requests that update a dependency file
Projects
Development

Successfully merging this pull request may close these issues.

Runtime error: feature referenced out of range key
3 participants