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

Some performance improvements stubs #1386

Closed

Commits on Feb 7, 2019

  1. Introduce scalafmt-dynamic to scalafmt-cli

    This PR enable scalafmt-cli to automatically fetch a scalafmt of which
    version matches the `version` setting in `.scalafmt.conf`.
    This change will help syncing the version of scalafmt among
    build tool integrations, editor integration, and scalafmt-cli.
    
    See: scalameta#1318
         scalameta#1346
    tanishiking committed Feb 7, 2019
    Configuration menu
    Copy the full SHA
    994e7c0 View commit details
    Browse the repository at this point in the history

Commits on Feb 10, 2019

  1. Configuration menu
    Copy the full SHA
    9360152 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9d1f39a View commit details
    Browse the repository at this point in the history
  3. scalameta#1344 refactor ScalafmtDynamic to sub-components

    1) Moved everything related to downloading process to
    ScalafmtDynamicDownloader
    2) Created errors ADT for all currently reported error types
    3) Split format method to two: one returns machine readable error from
    from errors ADT hierarchy, another one handles the error and reports
    user-readable message to provided reporter
    unkarjedy committed Feb 10, 2019
    Configuration menu
    Copy the full SHA
    eab1903 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3a2171f View commit details
    Browse the repository at this point in the history
  5. scalameta#1344 ScalafmtReflect refactor:

    1) move invoke and invokeAs to implicit ops class methods
    2) add invokeStatic implicit method for classes
    3) rearrange classes and methods loaded from classLoader
    4) unified field names for loaded classes
    unkarjedy committed Feb 10, 2019
    Configuration menu
    Copy the full SHA
    d6de3ed View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    22257df View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    01f9616 View commit details
    Browse the repository at this point in the history

Commits on Feb 18, 2019

  1. Configuration menu
    Copy the full SHA
    88d4db3 View commit details
    Browse the repository at this point in the history
  2. scalameta#1344 distinguish 3 different errors while downloading scalafmt

    - resolve error during download
    - unknown exception during download: network errors, possible NPE etc...
    - corrupted classpath exception: for cases when reflection operations
    inside ScalafmtReflect cause unhandled exceptions
    unkarjedy committed Feb 18, 2019
    Configuration menu
    Copy the full SHA
    4d73e89 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2019

  1. scalameta#1344 huge refactoring

    - ScalafmtDynamic is now responsible for both config caching and
    scalafmt caching
    - ScalafmtDynamic is now responsible for checking for checking whether
    source file matches config includes/excludes filter
    - ScalafmtReflect now simply represents a wrapper around Scalafmt
    instance of a specific version, providing us an interface that
    encapsulates all reflection stuff
    unkarjedy committed Feb 19, 2019
    Configuration menu
    Copy the full SHA
    3ef9337 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    80e408b View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2019

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

Commits on Feb 21, 2019

  1. Enable scalafmt-cli to use dynamic or core depending on version setting.

    - Load a scalafmt jar using scalafmt-dynamic only when
      scalafmt-cli's version doesn't match specified `version` setting.
      If the version matches, scalafmt-cli formats codes using
      pre-resolved scalafmt to save the overhead for resolving scalafmt
      jar on runnning.
    - Create tempFile that contains configration string specified by
      `--config-str` option for passing configration to scalafmt-dynamic.
    tanishiking committed Feb 21, 2019
    Configuration menu
    Copy the full SHA
    10093d1 View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2019

  1. Add comments

    tanishiking committed Feb 23, 2019
    Configuration menu
    Copy the full SHA
    6e78053 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6f54714 View commit details
    Browse the repository at this point in the history

Commits on Feb 24, 2019

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

Commits on Feb 25, 2019

  1. Add tests for scalafmt-cli

    - Test for the behavior if .scalafmt.conf is missing.
    - Test for the behavior if `version` setting is missing.
    tanishiking committed Feb 25, 2019
    Configuration menu
    Copy the full SHA
    3dea40f View commit details
    Browse the repository at this point in the history
  2. Merge pull request scalameta#1372 from er1c/indent-operator-fix

    Indent Operator Fix
    tanishiking authored Feb 25, 2019
    Configuration menu
    Copy the full SHA
    6a27e7c View commit details
    Browse the repository at this point in the history
  3. Merge pull request scalameta#1366 from tanishiking/scalafmt-dynamic-cli

    Make scalafmt-cli to use scalafmt-dynamic module instead of depending on specific version of scalafmt-core.
    tanishiking authored Feb 25, 2019
    Configuration menu
    Copy the full SHA
    fd48c4b View commit details
    Browse the repository at this point in the history

Commits on Feb 28, 2019

  1. Configuration menu
    Copy the full SHA
    1f4af58 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c0dc85d View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d052bf1 View commit details
    Browse the repository at this point in the history
  4. Merge pull request scalameta#1368 from unkarjedy/1344-api-changes-to-…

    …integrate-with-intellij
    
    1344 api changes to integrate with intellij
    olafurpg authored Feb 28, 2019
    Configuration menu
    Copy the full SHA
    fd840e7 View commit details
    Browse the repository at this point in the history

Commits on Mar 5, 2019

  1. Configuration menu
    Copy the full SHA
    f7a72d8 View commit details
    Browse the repository at this point in the history
  2. Merge pull request scalameta#1377 from tanishiking/document-sbt-scala…

    …fmt-org
    
    Update website for sbt-scalafmt 2.0.0-RC5
    tanishiking authored Mar 5, 2019
    Configuration menu
    Copy the full SHA
    2beea14 View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2019

  1. Avoid newlines after yield keyword.

    ```scala
    // Before
    for (a <- as)
    yield
      Future {
        // ...
      }
    // After
    for (a <- as)
    yield Future {
      // ...
    }
    ```
    
    It's possible to get the old behavior with `newlines.avoidAfterYield = false`.
    
    While working on this change, I observed that
    `style.indentYieldKeyword=true` (default) has undesirable (and
    unexpected) behavior for val definitions.
    ```scala
    // Before
    val x = for (a <- as)
      yield a
    // After
    val x =
      for (a <- as)
        yield a
    ```
    The new behavior is more consistent with how we handle other val
    definition bodies. By forcing a line break before `for`, we make
    it easier to associate the `for` keyword with its accompanying `yield`.
    olafurpg committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    7f3a53e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    437828e View commit details
    Browse the repository at this point in the history
  3. Remove trailing comma

    hehe seems the scalafmt repo uses and old scalafmt version that doesn't
    automatically remove trailing commas. Will upgrade in separate PR.
    olafurpg committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    4f84887 View commit details
    Browse the repository at this point in the history
  4. Merge pull request scalameta#1378 from olafurpg/yield

    Avoid newlines after yield keyword.
    olafurpg authored Mar 6, 2019
    Configuration menu
    Copy the full SHA
    f5d4ba1 View commit details
    Browse the repository at this point in the history
  5. Upgrade to latest scalafmt.

    There are a few regressions in the output IMO but I can live with them.
    olafurpg committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    094a971 View commit details
    Browse the repository at this point in the history
  6. Upgrade IntelliJ plugin

    olafurpg committed Mar 6, 2019
    Configuration menu
    Copy the full SHA
    53e60e1 View commit details
    Browse the repository at this point in the history
  7. Merge pull request scalameta#1379 from olafurpg/release

    Update changelog and document release process
    tanishiking authored Mar 6, 2019
    Configuration menu
    Copy the full SHA
    cc6e086 View commit details
    Browse the repository at this point in the history
  8. Merge pull request scalameta#1380 from olafurpg/upgrade-fmt

    Upgrade to latest scalafmt.
    tanishiking authored Mar 6, 2019
    Configuration menu
    Copy the full SHA
    4aba063 View commit details
    Browse the repository at this point in the history
  9. Merge pull request scalameta#1381 from olafurpg/intellij-upgrade

    Upgrade IntelliJ plugin
    tanishiking authored Mar 6, 2019
    Configuration menu
    Copy the full SHA
    8111bb2 View commit details
    Browse the repository at this point in the history

Commits on Mar 14, 2019

  1. Configuration menu
    Copy the full SHA
    ddb5bd8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2e03401 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    daadc20 View commit details
    Browse the repository at this point in the history