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

Refactor client code and extract repository/library methods into new modules #510

Merged
merged 69 commits into from
Apr 6, 2022

Commits on Apr 4, 2022

  1. Add hx3compat dependency

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    286512a View commit details
    Browse the repository at this point in the history
  2. Move functions to FsUtils

    - Move  IS_WINDOWS
    - Remove extra absolutePath implementation
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    b3c8308 View commit details
    Browse the repository at this point in the history
  3. Extract repo management methods to new module

    Make minor refactor of `setup` command code
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    5be6aa7 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7b1d4b0 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    7839122 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    77e8c5b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a83d3c9 View commit details
    Browse the repository at this point in the history
  8. Refactor client initialization

    - Set all members of the client main class in the constructor.
    - Do not store settings that are not necessary outside the constructor.
    - Do not initialize site multiple times in some cases
    - Consider --debug and --quiet mutually exclusive
    - Print switch information in an ordered way
    - Do not run any code until it is known that the call is not being
    passed on to the updated haxelib version
      - Fix -cwd not working when redirecting to haxelib version
    - Separate command functionality from docs
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    891a183 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    3fcdce9 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    592f0d5 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    6ca47ec View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    bfd2563 View commit details
    Browse the repository at this point in the history
  13. Refactor run command code

    - Fix specifying a version not working if a development directory is set
    - Show an error if a non-existent version is specified instead of
      silently using a different version
    - Reset environment variables and current working directory after a run
      so that it is safe to use as a function in a process
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    29496d5 View commit details
    Browse the repository at this point in the history
  14. Refactor code for path and libpath commands

    - Show error if a non-existent library version is specified with either
      command, instead of silently using a different version, as now with
      the `run` command
    - If two versions of the same library are given to path, the error mentions
      them in the order they appeared
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    f6922cb View commit details
    Browse the repository at this point in the history
  15. Refactor list command code

    - Fix minor issue with alphabetical ordering
      - Before, they were sorted by `name:` instead of `name`, so for
        example `flixel` came after `flixel-addons`, which was incorrect
    - Do not list invalid versions
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    329aa19 View commit details
    Browse the repository at this point in the history
  16. Refactor the way settings are used by Cli and Vcs

    Remove no longer relevant TODO messages
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    42939db View commit details
    Browse the repository at this point in the history
  17. Show warnings to stderr

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    1ece648 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    76c7969 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    6ae5b17 View commit details
    Browse the repository at this point in the history
  20. Rework install, set and update

    - Check for hashlink c target when searching hxml for dependencies
    - Fix installing from `haxelib.json` with `--skip-dependencies` doing
      nothing
      - Previously, installing from a `haxelib.json` file was seen as
        installing dependencies, so with `--skip-dependencies` the command
        would do nothing. Now, with the flag, the libraries in the file are
        not skipped, however their dependencies still are.
    - Don't update vcs version if it is not set as current version HaxeFoundation#364
    - Decouple cli from installation code
    - Disallow setting invalid library versions with `set`
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    d936318 View commit details
    Browse the repository at this point in the history
  21. Add workarounds for capitalisation inconsistencies

    - Fix error when installing from hxml due to capitalisation
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    fcdc5f0 View commit details
    Browse the repository at this point in the history
  22. [docs] Update site documentation in line with changes

    - Use two dashes for `--notimeout` and `--cwd`
    - Update information on run version resolution
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    5985747 View commit details
    Browse the repository at this point in the history
  23. Refactor code for remove command

    - Fix issue where it was possible to remove a git/hg version even if a
    development path was set within it
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    0e54121 View commit details
    Browse the repository at this point in the history
  24. Clean up in Vcs.hx

    - Don't show updated message if vcs dependency was already up to date
    - Clean up debug logs of git/hg output
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    59ad81d View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    38d9fc8 View commit details
    Browse the repository at this point in the history
  26. Refactor submit command

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    8b54818 View commit details
    Browse the repository at this point in the history
  27. Refactor dev command

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    a717174 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    3125c6a View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    cf3abe1 View commit details
    Browse the repository at this point in the history
  30. Move reusable modules into api package

    To achieve separation of the haxelib cli from the general code that can
    be reused.
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    5e55d6a View commit details
    Browse the repository at this point in the history
  31. Configuration menu
    Copy the full SHA
    8daba0b View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    77aec45 View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    f60904b View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    f0ee079 View commit details
    Browse the repository at this point in the history
  35. Fix run with older versions of haxe

    Versions prior to haxe 4 don't recognise `--version` and print their
    version to stderr instead of stdout
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    712afce View commit details
    Browse the repository at this point in the history
  36. Remember capitalisation of library when installed

    Addresses HaxeFoundation#529
    
    This way, list shows the correct version of the name, and path falls
    back to the correct version when no haxelib.json is found.
    
    The "correct" version is the way the name in haxelib.json is
    capitalized, or if no such file exists it is the way the parameter to
    the `dev`/`git`/`hg` command was capitalized. Additionally, if
    the parameter is an alias, then it is used instead as well.
    
    It is updated everytime a version is set as current. However, officially
    released library version names are preferred over the capitalization of
    `dev`, `git`, or `hg` versions.
    
    For example, after:
    `haxelib dev LIBRARY <path>`
    `haxelib install library 1.0.0`
    
    If `library` is the version in `haxelib.json`, then that is preferred
    over `LIBRARY` after we install from the server.
    
    Throw error in `path` command when two versions of the same lib are
    queried even if the two versions are capitalized differently.
    - e.g. `LiBrArY:1.2.0` and `library:1.3.0`
    
    Ensure that haxelib run sets HAXELIB_RUN_NAME to name field in
    `haxelib.json`.
    
    Ignore capitalized directories in `list`.
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    6969dda View commit details
    Browse the repository at this point in the history
  37. [tests] Move a test folder

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    8cc06fa View commit details
    Browse the repository at this point in the history
  38. [tests] Adding testing for HaxeFoundation#529

    Also HaxeFoundation#465 and HaxeFoundation#503
    
    - Ensure haxelib is case insensitive for library names
    - Ensure haxelib keeps track of correct name capitalization for `list`
    command
    - Ensure haxelib.json name is preferred with git/hg/dev, unless an alias
    is given.
    - If there is no haxelib.json, ensure that the last name the user used
    is shown
    - Ensure running aliased libraries works correctly
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    a8b3520 View commit details
    Browse the repository at this point in the history
  39. Configuration menu
    Copy the full SHA
    6e95b82 View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    ee9e75e View commit details
    Browse the repository at this point in the history
  41. [tests] Add more testing for remove command

    For removing specific versions
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    488b96a View commit details
    Browse the repository at this point in the history
  42. [tests] Add tests for multiple issues

    - HaxeFoundation#364
    - HaxeFoundation#526
    - Ensure `list` doesn't break with invalid directories in the repository
    - Ensure `list` doesn't show invalid versions
    - Ensure --skip-dependencies doesn't break installing from haxelib.json
    - Ensure --cwd works
    - Ensure specifying versions with run, path, and libpath commands works
    properly HaxeFoundation#249
    - Don't show update message if vcs lib was already up to date
    - Ensure order of output of `path` is correct
    - Ensure remove can't break dev path set inside git/hg version
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    a936899 View commit details
    Browse the repository at this point in the history
  43. Configuration menu
    Copy the full SHA
    0df427c View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    e7147a9 View commit details
    Browse the repository at this point in the history
  45. Implement repository reformatting using fixrepo

    For breaking changes such as the library name case insensitivity change
    
    Show warning for every command using the repository if it is out of date
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    21f07bc View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    3935fae View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    82c1c02 View commit details
    Browse the repository at this point in the history
  48. Fix error to display library name correctly

    `haxelib path` now repeats the version of the name the user typed in if
    the library is not installed, instead of making it lowercase
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    53ee4ba View commit details
    Browse the repository at this point in the history
  49. Configuration menu
    Copy the full SHA
    b94ba75 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    ed7c0ef View commit details
    Browse the repository at this point in the history
  51. Minor cleanup

    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    5bba820 View commit details
    Browse the repository at this point in the history
  52. Configuration menu
    Copy the full SHA
    1939584 View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    46323b1 View commit details
    Browse the repository at this point in the history
  54. [tests] Set git user data in integration test repo

    Show error output in case git commands fail to make stuff like this
    easier to debug.
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    1d5606b View commit details
    Browse the repository at this point in the history
  55. [tests] Fix constructor issue for haxe non-nightly

    Not initialising the field in the abstract class constructor results in
    a compiler error in non nightly builds of haxe
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    64f00f8 View commit details
    Browse the repository at this point in the history
  56. Configuration menu
    Copy the full SHA
    4fc20fa View commit details
    Browse the repository at this point in the history
  57. Make reformatting more predictable

    Do not depend on how the system sorts child files/directories
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    f60ea15 View commit details
    Browse the repository at this point in the history
  58. Sort the correct array this time

    We don't need to sort on Windows as it has a case insensitive file
    system, so we won't get clashes.
    tobil4sk committed Apr 4, 2022
    Configuration menu
    Copy the full SHA
    acb1634 View commit details
    Browse the repository at this point in the history

Commits on Apr 5, 2022

  1. Install hxjava for --jvm target in hxml install

    Generate the regex from TARGETS to avoid repetition
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    7e4f8da View commit details
    Browse the repository at this point in the history
  2. Remove .c check for hashlink library

    `-D run` requires hashlink library to be installed even for bytecode
    compilation.
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    612c642 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8891ff6 View commit details
    Browse the repository at this point in the history
  4. Clean up messy switch

    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    7d1231b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    459c3c8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    cac1fae View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    ffbebc9 View commit details
    Browse the repository at this point in the history
  8. Remove Installer.installLatestFromHaxelib

    It is now combined with installFromHaxelib, whose version argument is
    now optional.
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    38b0916 View commit details
    Browse the repository at this point in the history
  9. Minor cleanup of install command code

    No need to check if the requested version matches the scope version, as
    if that were the case it would have been caught in the check above.
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    677f9d9 View commit details
    Browse the repository at this point in the history
  10. Fix installFromHxml on already installed libraries

    Prevent reinstalling existing libraries
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    18dbbb4 View commit details
    Browse the repository at this point in the history
  11. Set all library versions when installing from hxml

    Reverting to previous behaviour
    tobil4sk committed Apr 5, 2022
    Configuration menu
    Copy the full SHA
    1ad8f0b View commit details
    Browse the repository at this point in the history