-
Notifications
You must be signed in to change notification settings - Fork 50
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
Major refactor: extract datamodel package. #228
Commits on Aug 19, 2021
-
Major refactor: extract datamodel package.
Goal: make the root package of this repo into a place where we can put helper methods and powerful features (which depend on other packages!), rather than having it hamstrung by being the very bottom of the package dependency graph, and thus forcing all the interesting features and useful synthesis functions into difficult-to-discover subpackages. Also, the result just frankly reads well.
Configuration menu - View commit details
-
Copy full SHA for 906bce5 - Browse repository at this point
Copy the full SHA 906bce5View commit details -
Move LinkContext from datamodel package to linking.
Evidently, it fits there without issue. (The name stutter here is nonzero, but just calling it "Context" alone seems... worse, given how much meaning that word has in golang.)
Configuration menu - View commit details
-
Copy full SHA for 92bdcf4 - Browse repository at this point
Copy the full SHA 92bdcf4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2a770ef - Browse repository at this point
Copy the full SHA 2a770efView commit details -
Alias a few more things back into the root package.
Many of these will be transitional only, I think, but we'll see what the appropriate timescale is for that. It may be fine to leave them for quite a while. With these aliases, I've been able to substitute this branch in to... approximately all of our downstreams I know about, and all their tests still pass. That includes packages that have codegen outputs committed already (!). That includes go-ipfs, and thus includes all of the transitives between us and it. I think that means we're truly able to claim this will be a "no breaking changes" scenario when we merge this and it next comes time to tag a release. (Golang's alias feature is kind of incredible. I'm really happy.)
Configuration menu - View commit details
-
Copy full SHA for aa6f372 - Browse repository at this point
Copy the full SHA aa6f372View commit details -
Update all our packages to no longer reference the root package.
We can do all our work without it, necessarily. Let's do so. This could have happened opportunistically, as it was forced, too -- in fact, that's what the prior commits were all doing -- and we'd just expect that to happen more and more as we add new features and helper methods and glue into the root package. However, it's just as easy (in fact, probably easier) to do it proactively, all at once, right now.
Configuration menu - View commit details
-
Copy full SHA for 8970daf - Browse repository at this point
Copy the full SHA 8970dafView commit details -
Configuration menu - View commit details
-
Copy full SHA for b8cca7a - Browse repository at this point
Copy the full SHA b8cca7aView commit details -
These are based on manual review of the change in the godoc's list of exported symbols. (I haven't actually seen them used anywhere in downstreams in a way that their omission is a breaking change, but there's always a chance.) DeepEqual actually completely belongs here. ADL... I'm dubious on. I don't really think that should be in the datamodel package, either, actually. But let's roll with it. ErrHashMismatch... well, all those other errors already coming along for "a transitionary period", so we might as well apply that pattern consistently, and include this one too.
Configuration menu - View commit details
-
Copy full SHA for f530af1 - Browse repository at this point
Copy the full SHA f530af1View commit details -
Move ADL interface to package.
Also, fix up its docs. Phew, those had old and badly misleading links.
1Configuration menu - View commit details
-
Copy full SHA for fa9bec0 - Browse repository at this point
Copy the full SHA fa9bec0View commit details