Skip to content

Fix golang 1.11 compatibility on Windows#285

Closed
kolyshkin wants to merge 1 commit intogoogle:masterfrom
kolyshkin:go111
Closed

Fix golang 1.11 compatibility on Windows#285
kolyshkin wants to merge 1 commit intogoogle:masterfrom
kolyshkin:go111

Conversation

@kolyshkin
Copy link
Copy Markdown

Go 1.11beta1 introduces an incompatible change to the type of
CertChainPolicyPara.ExtraPolicyPara field [1], which results
in the following compile error on Windows:

x509\root_windows.go:112:3: cannot use
uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type
syscall.Pointer in field value

The fix, maintaining backward compatibility with Go 1.10 and 1.9,
is to use type alias. Unfortunately it won't work with go < 1.9
as those earlier versions lack the type alias feature.

This should fix issue #284.

[1] golang/go@4869ec00e87ef

Go 1.11beta1 introduces an incompatible change to the type of
CertChainPolicyPara.ExtraPolicyPara field [1], which results
in the following compile error on Windows:

> x509\root_windows.go:112:3: cannot use
> uintptr(unsafe.Pointer(sslPara)) (type uintptr) as type
> syscall.Pointer in field value

The fix, maintaining backward compatibility with Go 1.10 and 1.9,
is to use type alias. Unfortunately it won't work with go < 1.9
as those earlier versions lack the type alias feature.

This should fix issue google#284.

[1] golang/go@4869ec00e87ef

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Jul 4, 2018

Codecov Report

Merging #285 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #285   +/-   ##
=======================================
  Coverage   69.98%   69.98%           
=======================================
  Files          68       68           
  Lines        8769     8769           
=======================================
  Hits         6137     6137           
  Misses       2086     2086           
  Partials      546      546

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 3b560b3...f74f9e4. Read the comment docs.

@kolyshkin
Copy link
Copy Markdown
Author

Alternative to this one: #286

@daviddrysdale
Copy link
Copy Markdown
Contributor

Went for the #286 approach, let us know if we need to revisit.

@kolyshkin kolyshkin deleted the go111 branch August 14, 2018 16:28
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.

3 participants