Commit Graph

3251 Commits

Author SHA1 Message Date
Eugene Yokota d4dc90efd9 add Conversion from Project => LocalProject 2023-01-15 23:50:30 -05:00
Eugene Yokota 193b47b49b Fix taskDyn 2023-01-15 23:50:30 -05:00
Eugene Yokota ceb1ea8aad bump Zinc, which uses current util 2023-01-15 23:50:29 -05:00
Eugene Yokota fbc98ed72e Use ClassTag instead of Manifest 2023-01-15 23:50:29 -05:00
Eugene Yokota ecd59bd3e1 Scalafmt 3.6.0 2023-01-15 23:50:29 -05:00
Eugene Yokota d5d2ff05f0 Comment out tests 2023-01-15 23:48:13 -05:00
Eugene Yokota ad90590bc6 Fix project loading
Problem
-------
Given val root, currently both `root` and synthetic root gets loaded.
This might be caused by build.sbt being virtualized, and no longer
matching the build root directory.

Solution
--------
For now, comparing the canonical paths seems to fix the issue.
2023-01-15 23:48:13 -05:00
Eugene Yokota 54c12819df Adjust to the code changes 2023-01-15 23:48:13 -05:00
Eugene Yokota 9a2ca3c4da Fix compilation of the intrinsic Scala version 2023-01-15 23:48:13 -05:00
Eugene Yokota 4f85c11e01 Some minor tweaks to get things moving 2023-01-15 23:48:13 -05:00
Eugene Yokota cba7a0efc3 Refactor to build mainProj 2023-01-15 23:48:11 -05:00
Eugene Yokota 100f1ac09c Use flatMapTask instead of taskDyn 2023-01-15 23:47:41 -05:00
Eugene Yokota e9490e203b Use Type to compare types instead of TypeRepr 2023-01-15 23:45:35 -05:00
Eugene Yokota 0ee7d11afe Migrate updateTask via tuple syntax 2023-01-15 23:45:35 -05:00
Eugene Yokota 98302d7a13 Fix BSP 2023-01-15 23:45:35 -05:00
Eugene Yokota fe0de6ca30 Fix input task macro 2023-01-15 23:45:35 -05:00
Eugene Yokota 61d4fe2d30 Implement input task helper Def.input 2023-01-15 23:45:35 -05:00
Eugene Yokota 81a05430bd Split buildfile parsing to a subproject 2023-01-15 23:45:30 -05:00
Eugene Yokota 340721c4a1 KeyMacro 2023-01-15 23:43:57 -05:00
Eugene Yokota 781c0317f5 Format main 2023-01-15 23:43:19 -05:00
Eugene Yokota bb40e1bc87 Merge branch '1.9.x' into wip/merge-1.9.x 2022-12-31 16:28:47 -05:00
Chris Kipp 4a6832f281 fix: ensure sbt server says it's a debugProvider
I believe this was just an oversight that it's not marked as true since
sbt can handle `debugSession/start`. This change just ensures that
during the initialization process sbt says it's a `debugProvider` for
the same languages as `runProvider` and `testProvider`. It also
correctly marks the build targets as `canDebug`, unless they are sbt
targets.
2022-12-29 17:08:22 +01:00
Eugene Yokota 39dc13668f lm-coursier-shaded 2.0.12
https://github.com/coursier/sbt-coursier/releases/tag/v2.0.12
2022-10-30 18:25:04 -04:00
Ondra Pelech 01a501f4f7
Dependency graph with colors (based on the organization) (#7052) 2022-10-17 13:25:02 -04:00
Nabil Abdel-Hafeez e7a847615a
Add zio-test TestFramework to default test frameworks 2022-10-16 22:42:53 +02:00
frosforever d366b77b23 Protect against missing edges in graph by using map get vs apply 2022-10-02 14:04:50 -04:00
eugene yokota 666c2b69f4
Merge branch 'develop' into fix-modules-get 2022-10-02 13:44:05 -04:00
Eugene Yokota 2a61fb35f9 Fix /tmp/.sbt/ collision for domain socket
Problem
-------
Fixes https://github.com/sbt/sbt/issues/7013
In a shared environment, multiple users will try to create
`/tmp/.sbt/` directory, and fail.

Solution
--------
Append a deterministic hash like `/tmp/.sbt1234ABCD` based
on the user home, so the same directory is used for the given
user, but each user would have a unique runtime directory.
2022-10-02 12:45:30 -04:00
eugene yokota f0cb420fe2
Merge pull request #7031 from gontard/backport_6903_to_1.8.x
Backport #6903 to 1.8.x
2022-09-30 11:43:20 -04:00
gontard cc44169fe0 Fix testQuick on changed function in object
Fix https://github.com/sbt/sbt/issues/5504
2022-09-30 11:25:31 +02:00
gontard 89acd3eed1 Improve log for not found remote cache artifact
Before
remote cache not found for 0.0.0-7c40144bd1c774e6

After
remote cache artifact not found for org.gontard:sbt-test:0.0.0-7c40144bd1c774e6 Some(cached-compile)
2022-09-30 11:07:20 +02:00
Eugene Yokota b00792a3a7 Scala 2.12.17
This bumps up scala-xml to 2.x.
2022-09-17 04:09:52 -04:00
Eugene Yokota 573cd2de81 Giter8 0.15.0 by default 2022-09-11 13:03:43 -04:00
Eugene Yokota bbc91a4788 Merge branch '1.7.x' into fport/1.7.x 2022-08-10 21:53:50 -04:00
Devin Fisher 9f9b08edbd refactor printing error to an in-function function 2022-08-10 10:08:49 -04:00
Devin Fisher 5874ad920e add output when book server socket fails to create 2022-08-10 10:08:42 -04:00
eugene yokota ab59e4c6ba
Merge pull request #6998 from ckipp01/captureCodeBsp
feat: start forwarding diagnosticCode via BSP
2022-08-10 10:03:40 -04:00
Chris Kipp 15a45cb3c0 feat: start forwarding diagnosticCode via BSP
This change is a continuation of the work that was done in
https://github.com/sbt/sbt/pull/6874 to allow the Scala 3 compiler to
forward the `diagnosticCode` of an error as well as the other normal
things. This change in dotty was merged in
https://github.com/lampepfl/dotty/pull/15565 and also backported so it
will be in the 3.2.x series release. This change captures the
`diagnosticCode` and forwards it on via BSP so that tools like Metals
can can use this code.

You can see this in the BSP trace now for a diagnostic:

For example with some code that contains the following:

```scala
val x: Int = "hi"
```

You'll see the code in the BSP diagnostic:
```  "diagnostics": [
    {
      "range": {
        "start": {
          "line": 9,
          "character": 15
        },
        "end": {
          "line": 9,
          "character": 19
        }
      },
      "severity": 1,
      "code": "7",
      "source": "sbt",
      "message": "Found:    (\u001b[32m\"hi\"\u001b[0m : String)\nRequired: Int\n\nThe following import might make progress towards fixing the problem:\n\n  import sourcecode.Text.generate\n\n"
    }
  ]
```

Co-authored-by: Adrien Piquerez <adrien.piquerez@gmail.com>
Refs: https://github.com/lampepfl/dotty/issues/14904
2022-08-09 19:02:52 +02:00
Devin Fisher 157030212a refactor printing error to an in-function function 2022-08-08 11:21:43 -06:00
Devin Fisher 0d37a9eae2 add output when book server socket fails to create 2022-08-05 09:57:22 -06:00
Adrien Piquerez 634e8799e7 Catch ClosedChannelException in background job logger
We want the background job to stay alive even if its terminal
has been closed and we cannot write to it anymore
2022-08-05 14:45:38 +02:00
Adrien Piquerez 592086b889 Don't use ProxyTerminal in background job
If we use the ProxyTerminal in the background jobs, the logs
would be spread across different terminals, switching from active
client to active client. We want the logs to stick
to the client that started the job.
2022-08-04 16:48:13 +02:00
Adrien Piquerez 6bcda6684a Use BackgroundJobService context instead of MainLoop context
A new context is created and closed for each state of the MainLoop.
But the context of the backgroundJob must stay alive.
So we use a context that is owned by the BackgroundJobService.
It creates a new logger for each background job and cleans it when
the job stops.
2022-08-04 16:48:13 +02:00
Krzysztof Pado 2bffb2731e Add support for BSP's buildTarget/outputPaths method 2022-08-03 10:13:48 +02:00
Krzysztof Pado 58f0ff612c Add support for BSP's buildTarget/outputPaths method 2022-08-01 19:31:43 -07:00
Jason Pickens 5c933679fa
fix: change BSP JVM environment working directory to be a path 2022-07-27 11:56:27 +12:00
frosforever 1b21ecb1ce Protect against missing edges in graph by using map get vs apply 2022-07-19 09:55:45 -04:00
eugene yokota aad0464138
Merge pull request #6947 from eed3si9n/wip/banner
Banner
2022-07-02 19:20:11 -04:00
Eugene Yokota 31a6c60df3 Banner 2022-07-02 19:07:34 -04:00
Eugene Yokota 05d3d8689b Remove compatibility check from ++
Problem
-------
Since sbt-doge merger `++ <sv> <command1>` has used binary compatibility
as a test to select subproject, but it causes surprising situations like
sbt/sbt#6915, and it blurs the responsibility of YAML file and build
file as the version specified in the version can override the Scala
version test on local laptop.

Solution
--------
This removes the compatibiliy check (backward-only or otherwise),
and require that `<sv>` match one of `crossScalaVersions` using the new
Semantic Version selector pattern.
2022-07-02 18:38:04 -04:00