Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

Fix build for Windows #10

Merged
merged 1 commit into from
May 9, 2021
Merged

Fix build for Windows #10

merged 1 commit into from
May 9, 2021

Conversation

fatih
Copy link
Contributor

@fatih fatih commented May 4, 2021

This PR fixes the package so it can be imported when used under Windows.
The syslog package unfortunately is not supported under Windows. Hence
we disable it if we detect it.

Fixes the following error:

xlog.go:66:12: undefined: syslog.New
xlog.go:66:23: undefined: syslog.LOG_DEBUG

This PR fixes the package so it can be imported when used under Windows.
The `syslog` package unfortunately is not supported under Windows. Hence
we disable it if we detect it.

Fixes the following error:

```
xlog.go:66:12: undefined: syslog.New
xlog.go:66:23: undefined: syslog.LOG_DEBUG
```
@codecov
Copy link

codecov bot commented May 4, 2021

Codecov Report

Merging #10 (ef61403) into master (6f59da6) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #10   +/-   ##
=======================================
  Coverage   84.65%   84.65%           
=======================================
  Files          51       51           
  Lines        8522     8522           
=======================================
  Hits         7214     7214           
  Misses       1059     1059           
  Partials      249      249           

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 6f59da6...ef61403. Read the comment docs.

fatih added a commit to planetscale/cli that referenced this pull request May 4, 2021
This PR fixes our broken release pipeline. After adding support for `pscale database dump`, it started to depend to a new package `github.com/xelabs/go-mysqlstack/xlog`. This package unfortunately imports `syslog`, which doesn't work under Windows.

I opened a fix to upstream: xelabs/go-mysqlstack#10, but until that PR is merged, we should make sure we're not blocked on releasing new version of the CLI. Hence in this PR we change `go.mod` so it relies on my fork for now: https://github.com/fatih/go-mysqlstack/tree/fatih/fix-windows. We're going to remove the `replace` directive once the upstream PR is merged.

closes: planetscale/surfaces#285
Copy link

@iheanyi iheanyi left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Collaborator

@BohuTANG BohuTANG left a comment

Choose a reason for hiding this comment

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

Sorry for late.
LGTM
Thank you @fatih

@BohuTANG BohuTANG merged commit 082114d into xelabs:master May 9, 2021
@fatih fatih deleted the fatih/fix-windows branch May 10, 2021 12:09
fatih added a commit to planetscale/cli that referenced this pull request May 10, 2021
Our fix to upstream was merged:
xelabs/go-mysqlstack#10. Let's use that instead
of our fork.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants