Skip to content
Snippets Groups Projects
  1. Jan 14, 2020
    • Sigurd Meldgaard's avatar
      Parallel fetching of available versions (#2280) · 429a0603
      Sigurd Meldgaard authored
      Implements rate-limited parallel fetching of version information when solving.
      Also does speculative pre-fetching of version information of dependencies of the newest versions of each package.
      
      In informal benchmarks of pub get for a package whose only direct dependency is package:test the resolution time goes from 7.8 seconds to 1.5 seconds.
      
      Also adds package:pedantic to our direct runtime dependencies
      429a0603
    • Jonas Finnemann Jensen's avatar
      Retry on all SocketExceptions (#2254) · 6705b085
      Jonas Finnemann Jensen authored
      Do not retry on OS specific error codes for `SocketException`.
      These OS error codes are not documented in the code, and they
      may change behavior depending on OS and architecture.
      
      Furthermore, many seemingly persistent errors such as DNS lookup
      failures should be retried.
      
      Finally, if we retry a `SocketException` unnecessarily this is of
      little impact. It means that if the user doesn't have a network
      connection, or tries to use a `PUB_HOSTED_URL` pointing to a
      non-existent pub server, then it will take a bit longer before
      the user is informed of the problem.
      6705b085
    • Jonas Finnemann Jensen's avatar
      Use a unqiue file name for the snapshot during testing. (#2303) · a1820273
      Jonas Finnemann Jensen authored
      Testing `pub` without a snapshot is slow because many tests
      invokes `pub` as a commandline tool. Supplying the snapshot
      using a fixed filename is risky as it's easy to forget to
      delete/rebuild the snapshot causing test results to be
      out-of-date.
      
      By using an environment variable to specify the name of the
      `pub` snapshot, we can create a random temporary file for
      each test run. This minimizes the risk that we accidentally
      run tests with an outdated snapshot of `pub`.
      a1820273
  2. Jan 13, 2020
    • Sigurd Meldgaard's avatar
      Include osx and windows testing on Travis (#2299) · 72686563
      Sigurd Meldgaard authored
      This fixes a number of tests that failed on windows, and also two real bug fixes:
      
      - `pub global install` now prints
        precompiling package:binary instead of precompiling package:bin\binary on windows
      - #2122
       This is done by always using / for relative paths in pubspec lock path-dependencies
      72686563
  3. Jan 10, 2020
  4. Jan 09, 2020
  5. Jan 06, 2020
    • Nate Bosch's avatar
      Enforce and fix lints from package:pedantic (#2291) · ceaa86f2
      Nate Bosch authored
      - always_declare_return_types
      - annotate_overrides
      - curly_braces_in_flow_control_structures
      - prefer_for_elements_to_map_fromiterable
      - prefer_if_null_operators
      - prefer_single_quotes
      - prefer_spread_collections
      - unawaited_futures
      - use_function_type_syntax_for_parameters
      
      Rename a method starting with `get` to use a more accurately descriptive
      verb.
      
      Tighten the types on some methods highlighted by the
      `always_declare_return_types` lint by making them generic instead of
      returning `dynamic`.
      ceaa86f2
    • Nate Bosch's avatar
      Use more collection literals for args (#2293) · 6ce16065
      Nate Bosch authored
      Use a conditional element in a List literal instead of conditionally
      calling `.insert`. Change an implementation comment into an expanded doc
      comment for handling the no-unknown-keyword argument.
      
      Use a spread element instead of `..addAll`.
      6ce16065
    • Nate Bosch's avatar
      Rename some test utilities from Mock to Fake (#2294) · be245e6b
      Nate Bosch authored
      A Mock is an object that can record and verify interaction during a
      test, these classes are not mocks.
      be245e6b
    • Nate Bosch's avatar
      Refactor Set.add following !Set.contains (#2295) · f7638ce8
      Nate Bosch authored
      The `.add` method returns a boolean indicating whether then value was
      not already contained in the set. Find a few places where both are used
      unnecessarily and refactor to only call `.add` and use the returned
      boolean.
      f7638ce8
    • Jonas Finnemann Jensen's avatar
      Filter out `null` from `getCachedPackages`. (#2292) · 390022b2
      Jonas Finnemann Jensen authored
      The caller in `CacheListCommand.run` does not appear capable of handling
      `null` values. Hence, filtering it out seems reasonable in this case.
      390022b2
  6. Jan 03, 2020
    • Nate Bosch's avatar
      Fix existing hints and lints (#2290) · 0eea0c44
      Nate Bosch authored
      Fix 2 cases of `prefer_final_fields`. Fix some unnecessary_lambda
      surfaced by making one field final.
      
      Add a missing return on an argument to `List.map`.
      
      Change the argument type on some utility methods to allow a function
      returning `FutureOr` to avoid hints about missing returns on methods
      expected to return a `Future`.
      0eea0c44
  7. Jan 02, 2020
  8. Dec 12, 2019
    • Sigurd Meldgaard's avatar
      Don't precompile on pub get/upgrade by default (#2277) · 4d8ecbd4
      Sigurd Meldgaard authored
      And only precompile the single desired executable on pub run.
      
      `pub run` will avoid printing "precompiling executable..." if we don't have a terminal attached.
      That allows the output of `pub run` to be piped but still explains the user where time is going on first run of eg. pub run test in the terminal.
      
      This does not change pub global behavior. We probably want to continue recompiling all executables on pub global activate.
      
      `pub get` still allows --precompile for those who prefer the old behavior.
      4d8ecbd4
  9. Dec 03, 2019
  10. Nov 11, 2019
  11. Oct 29, 2019
  12. Oct 28, 2019
  13. Oct 25, 2019
  14. Oct 24, 2019
  15. Oct 22, 2019
  16. Oct 21, 2019
  17. Oct 20, 2019
  18. Oct 10, 2019
  19. Oct 03, 2019
  20. Sep 27, 2019
  21. Sep 16, 2019
  22. Sep 09, 2019
    • Nate Bosch's avatar
      Rephrase warnings for missing deps (#2203) · d99b0d58
      Nate Bosch authored
      Fixes #2204
      
      The phrase "doesn't depend on" can be interpreted as "doesn't use" and
      considered an unnecessary import. Rephrase to be more clear that the
      message is discussing the dependencies in pubspec.yaml.
      d99b0d58
Loading