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

[now-go] Fix import for go-bridge #3976

Merged
merged 2 commits into from Mar 28, 2020
Merged

[now-go] Fix import for go-bridge #3976

merged 2 commits into from Mar 28, 2020

Conversation

styfle
Copy link
Member

@styfle styfle commented Mar 28, 2020

Somehow, PR #3973 broke Go since the bridge is imported from this repo's master branch.

Go has very strict file name constraints and the file [...path].js is not compatible.

Here's what a @now/go deployment error message looks like:

Error: Command failed: go mod tidy
go: finding github.com/zeit/now latest
go: downloading github.com/zeit/now v0.0.0-20200326223129-c91495338d5e
go: extracting github.com/zeit/now v0.0.0-20200326223129-c91495338d5e
-> unzip /tmp/5a0676f5/pkg/mod/cache/download/github.com/zeit/now/@v/v0.0.0-20200326223129-c91495338d5e.zip: malformed file path "packages/now-next/test/fixtures/22-ssg-v2-catchall/pages/[...path].js": double dot
handler imports
github.com/zeit/now/utils/go/bridge: unzip /tmp/5a0676f5/pkg/mod/cache/download/github.com/zeit/now/@v/v0.0.0-20200326223129-c91495338d5e.zip: malformed file path "packages/now-next/test/fixtures/22-ssg-v2-catchall/pages/[...path].js": double dot

The solution is to move Go Bridge into a separate repository: https://github.com/zeit/now-go-bridge

This will also have the side effect of speeding up Go imports because the repo will be much smaller.

@codecov
Copy link

codecov bot commented Mar 28, 2020

Codecov Report

Merging #3976 into master will not change coverage by %.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3976   +/-   ##
=======================================
  Coverage   13.59%   13.59%           
=======================================
  Files         278      278           
  Lines        9963     9963           
  Branches     1301     1301           
=======================================
  Hits         1354     1354           
  Misses       8516     8516           
  Partials       93       93           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c914953...d0f938f. Read the comment docs.

@styfle styfle requested review from ijjk and Timer March 28, 2020 20:56
@styfle
Copy link
Member Author

styfle commented Mar 28, 2020

Ok this didn't work because we can't pin a version unfortunately.

Error: can only use path@version syntax with 'go get'

I'm going to move Go Bridge to a separate repo.

@styfle styfle changed the title [now-go] Pin import to commit sha [now-go] Fix import for go-bridge Mar 28, 2020
Copy link

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm

@kodiakhq kodiakhq bot merged commit 569200a into master Mar 28, 2020
@kodiakhq kodiakhq bot deleted the fix-go-import branch March 28, 2020 22:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants