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

SI-6623 -Yrepl-use-magic-imports avoids nesting $iw wrappers #79

Closed
wants to merge 24 commits into from

Commits on Oct 31, 2019

  1. [nomerge] Avoid allocations of reusable CanBuildFroms

    (For 2.12.x's eyes only.)
    
    Use vals to cache a single instance of stateless CanBuildFrom instances.
    These are cast by the existing `implicit def` to the suitable generic
    type. This pattern was already used in some places -- this PR applies
    it systematically across `collection.{mutable,immutable}`.
    
    The `CanBuildFrom` instances for arrays and wrapped arrays are
    cached for each primitive type, Unit, and Object. Each of these
    instances is backed by a dedicated subclass of CanBuildFrom that
    avoids subsequent dispatch on the `ClassTag[T]`.
    retronym committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    b6ba518 View commit details
    Browse the repository at this point in the history
  2. use existing ClassTag

    mkeskells committed Oct 31, 2019
    Configuration menu
    Copy the full SHA
    f986e03 View commit details
    Browse the repository at this point in the history

Commits on Nov 23, 2019

  1. Configuration menu
    Copy the full SHA
    999239c View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2019

  1. Configuration menu
    Copy the full SHA
    4109888 View commit details
    Browse the repository at this point in the history
  2. Merge pull request scala#8560 from som-snytt/backport/t11802

    [nomerge] Backport windows test fix
    SethTisue committed Nov 28, 2019
    Configuration menu
    Copy the full SHA
    e2ca633 View commit details
    Browse the repository at this point in the history

Commits on Dec 1, 2019

  1. review comments

    order matches in expected frequency order (Array, WrappedArray + associated builders, and ClassTag.newArray)
    avoid extra def in BitSets
    don't optimise for NoBuilder cases
    mkeskells committed Dec 1, 2019
    Configuration menu
    Copy the full SHA
    18bf349 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2019

  1. Configuration menu
    Copy the full SHA
    10b635e View commit details
    Browse the repository at this point in the history
  2. Merge pull request scala#8569 from hrhino/topic/more-tests

    two more tests for apparently-fixed issues
    SethTisue committed Dec 2, 2019
    Configuration menu
    Copy the full SHA
    f0c3dbc View commit details
    Browse the repository at this point in the history
  3. Merge pull request scala#8550 from som-snytt/issue/11807-2.12

    [nomerge] ConcatIterator.last advances
    lrytz committed Dec 2, 2019
    Configuration menu
    Copy the full SHA
    de94b78 View commit details
    Browse the repository at this point in the history

Commits on Dec 3, 2019

  1. Configuration menu
    Copy the full SHA
    b21589b View commit details
    Browse the repository at this point in the history
  2. Merge pull request scala#8572 from lrytz/travis-import-2.12

    [backport] Import travis caching config and JDK install from scala-dev
    lrytz committed Dec 3, 2019
    Configuration menu
    Copy the full SHA
    fc6d511 View commit details
    Browse the repository at this point in the history

Commits on Dec 5, 2019

  1. review comments

    use direct vals where no casting is required
    mkeskells committed Dec 5, 2019
    Configuration menu
    Copy the full SHA
    f9d9136 View commit details
    Browse the repository at this point in the history
  2. Merge pull request scala#8467 from rorygraves/mike/2.12_CanBuildFrom

    Avoid allocations of reusable CanBuildFroms
    szeiger committed Dec 5, 2019
    Configuration menu
    Copy the full SHA
    de3451d View commit details
    Browse the repository at this point in the history

Commits on Dec 10, 2019

  1. Bump Xmx for type-tag-leak

    The test allocates 16*16 MB, so testing with a 192 MB heap should
    be safe to catch the leak.
    
    Tested with running the test in a `while true` loop locally
      - constanly fails with 192 MB on 2.13.1
      - constantly succeeds with 192 MB on 2.13.2-bin-9ef8fc3
      - flaky with 128 MB on 2.13.2-bin-9ef8fc3
    
    (cherry picked from commit ffcffc6)
    lrytz authored and retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    36c6888 View commit details
    Browse the repository at this point in the history
  2. Merge pull request scala#8585 from retronym/topic/backport-type-tag-leak

    [backport] Bump Xmx for type-tag-leak
    retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    e474144 View commit details
    Browse the repository at this point in the history
  3. Refactor Context creation

      - Make `ImportContext` a nested class
      - Avoid the constructor of the superclass `Context` needing to
        call methods on the unitialized subclass ImportContext by
        computing `isRootContext` / `depth` externally in the
        factory method.
    retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    dca6f5a View commit details
    Browse the repository at this point in the history
  4. SI-6623 -Yrepl-use-magic-imports avoids nesting $iw wrappers

    Rather than adding a wrapper object for each import in the session
    history, just use a single wrapper preceded by the imports which
    have been interspersed with a magic import to bump context depth.
    
    Code is still ordinarily wrapped in a `$read` object.
    
    This is a step toward 6623-like transparency.
    
    `retronym` takes the blame for this innovation.
    `adriaanm` collaborated in its commission.
    `somsnytt` batted clean-up.
    retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    317775b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    9e146e8 View commit details
    Browse the repository at this point in the history
  6. Run some completions tests under -Yrepl-classbased and fix completion…

    … bug
    
    By default, the parser tries to heal incomplete source files by inserting
    missing braces. Compilation will still error out, but any subsequent
    parser/type errors make more sense to the user when this healing works.
    
    The healing uses indentation to figure out the intent of the code. Wrapped
    REPL snippets aren't properly indented, and in the test case I added the
    healing seems counterproductive.
    
    This commit disables it in REPL tab completion, in line with the way that
    IMain parses the wrapped code for real compilation.
    retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    7613d84 View commit details
    Browse the repository at this point in the history
  7. Small improvements to REPL -Yrepl-class-based

      - add comments describing a problem I discovered with imports
        and a possible solution
      - Make strip wrappers from REPL output for the wrappers generated in this mode
    retronym committed Dec 10, 2019
    Configuration menu
    Copy the full SHA
    1659fec View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ff991f5 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2019

  1. Stabilize output in REPL tests between indy and inline lambdas

    This detail changes under -Yrepl-class-based. We prefer tests that operate
    under either mode.
    retronym committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    f4cb764 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    cba5394 View commit details
    Browse the repository at this point in the history
  3. Revert exploratory changes to default REPL wrappers

    Revert "Enable magic imports unconditionally to survey test results"
    
    This reverts commit b02f890.
    
    Revert "Enable -Yrepl-class-based to survey test failures"
    
    This reverts commit d64af1a.
    retronym committed Dec 12, 2019
    Configuration menu
    Copy the full SHA
    50c74cd View commit details
    Browse the repository at this point in the history