-
Notifications
You must be signed in to change notification settings - Fork 211
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
stop using go:linkname across modules #546
Comments
It is unclear if Go 1.23 will enforce exactly that level, but either way it's good for starlark not to be using linkname. |
https://protobuf.dev/programming-guides/serialization-not-canonical/ explains why proto serialization is inherently unstable: essentially, known and unknown fields are ordered differently, which means the age of the descriptors linked into your executable (and thus the set of known fields) affects the ordering. If this was just for text marshaling, forking the formatter would be unpleasant but viable, but this argument applies to binary marshaling too, and there's no way we're going to fork that code. I can't yet see a way to both avoid linkname and retain the determinism that is essential to many applications of Starlark... though perhaps it has always been less deterministic than I thought. |
Could this help? https://github.com/planetscale/vtprotobuf And about proto descriptors being inherently incompatible with Starlark goals: how about updating |
Yes, it could, though it's a substantial dependency.
I'm not sure exactly what you mean. Certainly descriptors can evolve, and that means the API they present to Starlark problems will change, but I don't see a fundamental problem there. It's also possible the "unknown fields" issue just doesn't matter much in practice: if all calls to Further research is needed before we know what action to take, and we should be guided by the actual users of the |
go1.23 will start to enforce "two-party consent" on linkname: that is, you can use it to share variables between packages controlled by the same author (in practice: within the module), but not to punch through the drywall of other modules.
Starlark-go uses cross-module linkname for two purposes:
The text was updated successfully, but these errors were encountered: