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

Major refactor: extract datamodel package. #228

Merged
merged 8 commits into from
Aug 19, 2021
Merged

Major refactor: extract datamodel package. #228

merged 8 commits into from
Aug 19, 2021

Commits on Aug 19, 2021

  1. 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.
    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    906bce5 View commit details
    Browse the repository at this point in the history
  2. 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.)
    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    92bdcf4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a770ef View commit details
    Browse the repository at this point in the history
  4. 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.)
    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    aa6f372 View commit details
    Browse the repository at this point in the history
  5. 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.
    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    8970daf View commit details
    Browse the repository at this point in the history
  6. typo fixes

    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    b8cca7a View commit details
    Browse the repository at this point in the history
  7. Add just a few more aliases.

    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.
    warpfork committed Aug 19, 2021
    Configuration menu
    Copy the full SHA
    f530af1 View commit details
    Browse the repository at this point in the history
  8. Move ADL interface to package.

    Also, fix up its docs.  Phew, those had old and badly misleading links.
    warpfork committed Aug 19, 2021
    1 Configuration menu
    Copy the full SHA
    fa9bec0 View commit details
    Browse the repository at this point in the history