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

Fix gccgo compatibility #2

Closed

Conversation

davecheney
Copy link
Contributor

Introduce a conditional constant to deal with the implementation differences between gc and gccgo.

There is one test still to fix (down from 5)

--- FAIL: TestMask (0.00 seconds)
errors_test.go:231: unexpected details: want "[{/home/dfc/src/github.com/juju/errgo/errors_test.go:39: } {/home/dfc/src/github.com/juju/errgo/errors_test.go:38: foo}]"; got "[{} {foo}]"

Introduce a conditional constant to deal with the implementation differences between gc and gccgo.

There is one test still to fix (down from 5)

--- FAIL: TestMask (0.00 seconds)
        errors_test.go:231: unexpected details: want "[{/home/dfc/src/github.com/juju/errgo/errors_test.go:39: } {/home/dfc/src/github.com/juju/errgo/errors_test.go:38: foo}]"; got "[{} {foo}]"
@@ -334,7 +334,7 @@ func MaskFunc(allow ...func(error) bool) func(error, ...func(error) bool) error
allowEither = allow
}
err = Mask(err, allowEither...)
setLocation(err, 1)
// setLocation(err, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why was this one removed?

@davecheney
Copy link
Contributor Author

I've addressed your comments, this change is now just adjusting the caller offset for gc vs gccgo

@howbazaar
Copy link
Contributor

Now with the expected usage test case from pull/3 we not get that failing with this change as I expected.

@davecheney davecheney closed this May 16, 2014
@davecheney davecheney deleted the 001-fix-gccgo-compatibility branch May 16, 2014 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants