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

remove FileCodebase and some weeds #2363

Merged
merged 10 commits into from
Aug 31, 2021
Merged

remove FileCodebase and some weeds #2363

merged 10 commits into from
Aug 31, 2021

Commits on Aug 30, 2021

  1. stripping and unknotting some stuff

    - moved everything that depended on V1 `Reference` into `FileCodebase` namespace, duplicating a lot of code for better or worse.
    - pulled these into their own modules:
        - Codebase (types) into `Codebase.Type`; `Codebase` module re-exports them
        - `Codebase.Branch.Merge`,
        - `Codebase.Branch.Names` (Branch shouldn't depend on `Names`)
        - `Codebase.BuiltinAnnotation`
        - `Codebase.Causal.FoldHistory`
        - `Codebase.CodeLookup.Util` (remove `CodeLookup` dependency on `UnisonFile`)
        - `Codebase.DataDeclaration.ConstructorId` trying to use this alias in relevant places
        - `Codebase.Init`
        - `CodebasePath`, the `FilePath` alias.
        - `Lexer.Pos` (because `AnnotatedText`, `Range`, `Parser.Ann` shouldn't depend on the whole lexer)
        - `Names.ResolutionResult` (`Type` shouldn't depend on `Names`)
        - `PrettyPrintEnv.FQN`
        - `PrettyPrintEnv.Names` (pulled out references to `Names` from `PPE`)
        - `PPE.Util` not 100% sure what's happening here
        - `PrettyPrintEnvDecl` pull this data type and supporting functions into separate module
        - `Path.Parse` (`Path` shouldn't depend on the lexer)
        - `Path.Convert`, `Path.Parse` into `Unison.Util.Convert`
        - `Parser.Ann` (`Codebase`, etc. etc. shouldn't depend on `Parser`)
        - `Referent'` (`SyntaxText`/`ColorText` shouldn't depend on `Reference`)
            - `Referent` module re-exports stuff from `Referent'`, hard-coded to `Reference`.
        - removed `SyntaxText.SyntaxText`
        - `TermEdit.Typing` (because `TermEdit` shouldn't depend on the full typechecker)
        - `UnisonFile` / `TypecheckedUnisonFile` (types into `UnisonFile.Type`)
        - `UnisonFile.Env`
        - `UnisonFile.Error`
        - `UnisonFile.Names`
        - `Var.WatchKind`
        - `Var.refNamed`
    - Deleted unused `Codebase.Classes` typeclasses wip
    - Deleted unused `Unison.Util.Menu`, ancient modal stuff
    - Moved `Codebase.makeSelfContained` into `UnisonFile` module, since it deals with `UnisonFile` and not with `Codebase`.
    - split up `GitError` into a more codebase-agnostic hierarchy (see `Codebase.Type.GitError`)
    - changed `bindNames` to `bindReferences` in some cases; `bindNames` remains in `.Names` compatibility module
    - move `Unison.Var.refNamed` into `Unison.Term`
    - tweaked GitError to separate obviously codebase-format specific errors from non-obviously-corbase-format-specific errors.
    - tweaked `Reflog.Entry` to support anything that's coercible to `Unison.Hash`, but also changed its kind
    - removed `DebugBranchHistoryI` input because I didn't want to maintain its implementation
    - removed `ShortBranchHash` dependency on `Hash`, and let it work on anything coercible to `Hash`.  P.S./todo This class should be called ShortHash; the existing ShortHash is really a ShortReference!
    - removed SyntaxText dependency on Reference
    - cleaned up `Path` somewhat
    - held off on:
        - move `DD.updateDependencies`
        - splitting up `Path` into the billion different components
            - e.g. `Path` becomes `RelativePath`, `Path'` becomes `Path`, and `Absolute` wraps `RelativePath`
            - `Split` / `Split'` maybe rename to `Path.NonEmpty`?
        - rename `Branch.getPatch` / `.getMaybePatch`
        - split out `Name.Parse`, `Name.Convert`, substitute a lot of specific functions like `Path.hqSplitFromName'` with `Convert.parse`.
    - todo:
        - clear unreferenced junk
        - restore:
            - `NameEdit`?
            - `PatternCompat`?
    aryairani committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    2f13ea1 View commit details
    Browse the repository at this point in the history
  2. delete FileCodebase

    and DebugBranchHistoryI
    aryairani committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    b273199 View commit details
    Browse the repository at this point in the history
  3. Merge remote-tracking branch 'origin/trunk' into topic/weed-codebase1-5

    # Conflicts:
    #	parser-typechecker/src/Unison/Codebase.hs
    #	parser-typechecker/src/Unison/Codebase/Editor/HandleCommand.hs
    #	parser-typechecker/src/Unison/PrettyPrintEnv.hs
    #	parser-typechecker/unison/Main.hs
    #	unison-core/src/Unison/Names3.hs
    #	unison-core/src/Unison/Pattern.hs
    #	unison-core/src/Unison/Term.hs
    #	unison-core/src/Unison/Type.hs
    #	unison-core/src/Unison/Util/Relation.hs
    #	unison-core/unison-core1.cabal
    aryairani committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    5dc190c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9d6d007 View commit details
    Browse the repository at this point in the history
  5. add two missing messages

    aryairani committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    0ce117e View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f52397b View commit details
    Browse the repository at this point in the history
  7. remove CodebaseFormat+parser from ArgParse

    and update messages
    aryairani committed Aug 30, 2021
    Configuration menu
    Copy the full SHA
    f7746a4 View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2021

  1. Configuration menu
    Copy the full SHA
    81a32fc View commit details
    Browse the repository at this point in the history
  2. restore -Werror

    aryairani committed Aug 31, 2021
    Configuration menu
    Copy the full SHA
    4346f57 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a2e5895 View commit details
    Browse the repository at this point in the history