Closed flowrean closed 2 years ago
@iwpnd Actually I am building a Docker image. It should include the UI, right?
From the master
branch at tag v0.14.0
, the UI works, but in v0.15.x
it doesn't.
Do you know of a reason v0.15.x
was not based on the most recent commit from master
?
@flowrean I think this is related to the PR: https://github.com/go-spatial/tegola/pull/801. I re-opened that PR as there seems be a regression that I have not tracked down quite yet. What version of Go are you using? I think you're going to need to have npm
installed and then run go generate ./...
from the repo root to build the ui.
I can confirm the issue as I encountered the same forking v0.15.0 branch for my test image. @ARolek Following the guide in /ui fixed the issue and I was able to include it.
I think this is related to the PR: #801.
Ah yes, it seems something strange happened there.
What version of Go are you using? I think you're going to need to have
npm
installed and then rungo generate ./...
from the repo root to build the ui.
I am using Go 1.17.6. When running go generate ./...
the npm run build
errors for me but it is really a Docker image I am interested in. After merging master
into v0.15.x
locally, the UI indeed seems fixed in the image built from the Dockerfile in the repo root.
Don't bother with master as it is not the default branch of this project and is a couple of commits behind right now. If you want your image to have a ui, build it as I posted, then build the image. Since the Dockerfile copies everything in the workdir over prior to building tegola, the ui will be included.
Thanks for chiming in @iwpnd! We will make this easier going forward.
Thanks for your fast replies!
I tried to follow the guide, but the npm run build
step fails:
Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './2020/CreateDataProperty' is not defined by "exports" in /Users/flowrean/go/src/github.com/go-spatial/tegola/ui/node_modules/es-abstract/package.json
I don't have much experience with JS and wouldn't know what I could be doing wrong here, the instructions seem pretty straightforward.
I'm still a bit confused about the branches too. Master is indeed several commits behind, but it is also a few commits ahead.
I'm following the instructions to the point and do not run into issues.
It's safe to delete the node_modules
directory and the package-lock.json
and re-run npm install
.
Again, don't worry about master. v0.15.x
is the master/main of this repository. Think of it like a development branch only that you don't (necessarily) merge it in master in the end. Every new commit goes towards the v0.15.0
version. Once the maintainers bump the minor version and officially release 0.15.0, the default branch will probably change to v0.16.x
.
When I follow the instructions literally, go-bindata
cannot be found.
I can't help but notice some things related to go-bindata
changed in this commit that is in v0.14.0
but not in v0.15.x
: caf3fa8. Sorry to start about this again. I do understand the branching strategy but don't understand this:
Here are the steps I found that eventually made it work:
rm -rf ui/package-lock.json ui/node_modules # package-lock.json that is checked in won't do
go install -mod=vendor github.com/jteeuwen/go-bindata/go-bindata
go generate ./...
docker build -t tegola --build-arg VERSION=97ebfc0 .
So now the UI is included in the image. Thanks for the help!
My problem is solved but I'm leaving the issue open in case some changes should be done in the repo. Feel free to close it of course.
@flowrean thanks. Yeah the whole go-bindata part of this is a legacy artifact until we drop go 1.16 support. The PR I referenced addresses a build issue that users encounter when they're using Go 1.17+ which doesn't need go-bindata but instead uses go embed.
Can confirm the missing ui in gospatial/tegola:edge
so I suspect it will also be missing on release of v0.15.0. :/
I tracked it down to this commit 1f3156. Prior to that ui would be included.
This is fixed in this pr: https://github.com/go-spatial/tegola/pull/843
Hi
When I build from source based on the
v0.15.x
branch, the embedded viewer does not seem to work. I see a blank page with a single link.keep
instead of the fully functional UI I am used to seeing (using the latest Docker imagev0.14.0
).Looking at the branches, this is probably due to the four commits that are in the
master
branch and thev0.14.0
release, but not in thev0.15.x
branch. Maybemaster
should be merged intov0.15.x
?