Commit Graph

11537 Commits

Author SHA1 Message Date
eugene yokota 203ec0dafa
Merge pull request #6922 from sbt/dependabot/github_actions/actions/setup-python-4
Bump actions/setup-python from 2 to 4
2022-06-13 13:41:07 -04:00
Eugene Yokota 171383f2ad Fix javadoc 2022-06-13 03:17:44 -04:00
eugene yokota 26cef6dcc2
Merge pull request #6921 from sbt/dependabot/github_actions/actions/checkout-3
Bump actions/checkout from 2 to 3
2022-06-13 03:04:31 -04:00
dependabot[bot] 3376448701
Bump actions/setup-python from 2 to 4
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 2 to 4.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v2...v4)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 06:08:36 +00:00
dependabot[bot] 4be80a8fa0
Bump actions/checkout from 2 to 3
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-13 06:08:33 +00:00
eugene yokota 290925fd99
Merge pull request #6916 from eed3si9n/wip/revert-6814
[1.7.x] Revert "Add support for scala-output-version flag in Scala 3"
2022-06-13 01:57:48 -04:00
eugene yokota a4b05466c4
Merge pull request #6917 from eed3si9n/wip/bump-scala
[1.7.x] Bump to Scala 2.12.16
2022-06-13 01:49:22 -04:00
Eugene Yokota d9e43ecfdf Revert "Add support for scala-output-version flag in Scala 3"
This reverts commit 1e89d71311.
2022-06-13 01:28:37 -04:00
Eugene Yokota d5889d3ce3 Bump to Scala 2.12.16 2022-06-13 01:27:24 -04:00
eugene yokota 6afc6b53be
Merge pull request #6919 from eed3si9n/wip/lm
[1.7.x] lm 1.7.0-M1
2022-06-13 01:25:32 -04:00
Eugene Yokota c04b2a4f73 lm 1.7.0-M1
This removes OkHttp dependency.
This also removes an experimental feature to customize HTTP for Ivy called
CustomHttp we added in sbt 1.3.0.
Since LM got switched to Coursier in 1.3.0, I don't think we advertized
CustomHttp.
2022-06-13 00:52:32 -04:00
eugene yokota 1b4b9f3618
Merge pull request #6907 from eed3si9n/bport/6887
[1.7.x] Use XDG_RUNTIME_DIR environment variable to choose the path used for the creation of sockets
2022-05-29 01:51:37 -04:00
Alonso Montero 120014bd65 Use XDG_RUNTIME_DIR environment variable to choose the path used for the creation of sockets (#6887)
The `XDG_RUNTIME_DIR` environment variable will be used to choose the base directory in which the sockets will be created by **sbt**. This can help when issues such as #6777 appear. There are other related issues, such as #6101, [Metals issue #2235](https://github.com/scalameta/metals/issues/2235), [Che issue #18394](https://github.com/eclipse/che/issues/18394). Those are closed issues, but there are some cases in which the solution does not work (such as the case in #6777). Furthermore, the solution given seems more like a workaround than an actual fix.

**What causes this issue?**
At least in my case, the **ServerAlreadyBootingException** is thrown after **sbt** tries to create a Unix domain socket and fails. In my specific environment, I was not able to create the sockets in some directories because they were mounted on an NFS. This prevented me from using any automated sbt command on any of those directories (Metals uses sbt under the hood, and it was not able to start because of the ServerAlreadyBootingException), which in turn resulted in me not being able to use Metals on a project that was created on any of those directories. 

**How is the issue solved in this PR?**
If the `XDG_RUNTIME_DIR` environment variable is set, then sockets will be created in a folder with a hashed name, inside the directory `XDG_RUNTIME_DIR/.sbt/`. If this variable is not set, everything works exactly the same as always.

Let's see an example:

1. My environment variable `XDG_RUNTIME_DIR` is set to /home/alonso/.runtime-dir`
2. I create my project in `/home/alonso/workspace/hello-world`
3. I run `sbt compile`
4. The socket is created in `/home/alonso/.runtime-dir/.sbt/sbt-socket102030405060/sbt-load.sock`. The number **102030405060** is a hash that is computed from the base directory of the project (it is actually the same hash that is produced in order to create sockets in Windows) and it will be different depending on the location of the project
5. The sbt command executed correctly, which would not have happened if the socket had been created in the `home/alonso/workspace` directory or any of its subdirectories (in this example, `/home/BlackDiamond/workspace` corresponds to a network file share)

Co-authored-by: Alonso Montero <lumontero@mobilize.net>
2022-05-28 23:38:56 -04:00
eugene yokota 359dbed6a8
Merge pull request #6902 from unkarjedy/oldshell-fix-1.7.x
"oldshell" command should use `OldShell` on failure instead of `Shell`
2022-05-25 12:18:33 -04:00
dmitrii.naumenko 9565e33ea8 "oldshell" command should use `OldShell` on failure instead of `Shell`
following up https://github.com/sbt/sbt/pull/3098
2022-05-23 19:58:41 +03:00
Eugene Yokota 053834aea0 Zinc 1.7.0-M2 2022-04-17 23:26:40 -04:00
eugene yokota 1ec23fa616
Merge pull request #6883 from eed3si9n/bport/6870
[1.7.x] Backport 6870, 6880, and 6882
2022-04-17 19:35:54 -04:00
Philippus 11275f604c Fix typos 2022-04-17 18:32:38 -04:00
Philippus 20a9269e79 Add SBTN_AUTO_COMPLETE environment variable 2022-04-17 18:32:30 -04:00
xuwei-k 45518c7f24 Update semanticdbVersion 2022-04-17 18:32:14 -04:00
Ethan Atkins ca7c872e27 Restore watchOnTermination
At some point the watchOnTermination callback stopped working. I'm not
exactly sure how or why that happened but it is fairly straightforward
to restore. The one tricky thing was that the callback has the signature
(Watch.Action, _, _, _) => State, which requires propagating the action
to the failWatch command. The easiest way to do this was to add a
mutable field to the ContinuousState. This is rather ugly and reflects
some poor design choices but a more comprehensive refactor is out of
the scope of this fix.

This commit adds a scripted test that ensures that the callback is
invoked both in the successful and unsuccessful watch cases. In each
case the callback deletes a file and we ensure that the file is indeed
absent after the watch exits.
2022-04-17 18:31:54 -04:00
Ethan Atkins 64c7071ff2 Move on-termination test 2022-04-17 18:31:45 -04:00
eugene yokota 43048e44f6
Merge pull request #6879 from kpodsiad/bsp/server-capabilities
bsp: add JVM test/run env capabilities to BSP
2022-04-17 18:27:29 -04:00
eugene yokota 543e8318b0
Merge pull request #6874 from ckipp01/problem
feat: update Problem to account for related information and code
2022-04-17 14:22:25 -04:00
Kamil Podsiadlo faf8dfde72 bsp: add JVM test/run env capabilities to BSP 2022-04-16 13:46:12 +02:00
Adrien Piquerez e37b0f44a1
Merge pull request #6875 from kpodsiad/backport/6858
[1.7.x] feat: implement BSP's environment requests
2022-04-12 21:03:06 +02:00
Kamil Podsiadlo f16412c3dd tests: run&test environment requests 2022-04-12 20:09:39 +02:00
Kamil Podsiadlo 6eb911ad15 refactor: simplify JVm environment requests
refactor: extract common logic to the `bspInputTask`
2022-04-12 20:09:35 +02:00
Kamil Podsiadlo ad4113caeb feat: implement BSP's JVM environment requests 2022-04-12 20:09:31 +02:00
Kamil Podsiadlo 85efc87879 feat: generate JVM environment requests 2022-04-12 20:09:26 +02:00
Chris Kipp f90b09f1ee feat: update Problem to account for related information and code
This PR makes changes to the existing `xsbti.Problem` to account for an
optional diagnostic code that the compiler can return for a given
diagnostic and also related information.

Given a piece of code like:

```scala
try {}
```

You'll receive the following:

```
-- [E002] Syntax Warning: /Users/ckipp/Documents/scala-workspace/dotty-error-index/examples/002_EmptyCatchAndFinallyBlockID.scala:3:2
3 |  try {}
  |  ^^^^^^
  |  A try without catch or finally is equivalent to putting
  |  its body in a block; no exceptions are handled.
```

The `E002` here is the actual code. Right now there would be no
description.

Some diagnostics have multiple positions that they need to represent.
You can see an example of this
[here](lampepfl/dotty#14002) in Dotty with the
use of inlining. Instead of needing to rely on including all of that
information in the diagnostic message it can now be extracted out into
a `DiagnosticRelatedInformation`.

These changes reference the conversation in #6868
2022-04-12 11:13:19 +02:00
eugene yokota d065f38576
Merge pull request #6854 from eed3si9n/bport/6847
[1.7.x] Do not fire `build/publishDiagnostics` if there are (and were) no problems
2022-03-27 00:55:00 -04:00
eugene yokota 71f45ba404
Merge pull request #6853 from eed3si9n/bport/6849
[1.7.x] includePluginResolvers should work for coursier resolutions
2022-03-27 00:54:48 -04:00
Rikito Taniguchi f5e9ab8424 Add test to verify server doesn't send notifications 2022-03-27 00:12:30 -04:00
Rikito Taniguchi 620c55d6ac Re-publish warnings on BSP server startup
Imitate 8aaf828b03
2022-03-27 00:12:23 -04:00
Rikito Taniguchi 862d373f02 Don't fire publishDiagnostic if there's no problems both in current and previous compilation 2022-03-27 00:12:14 -04:00
Brice Jaglin 491f70cd30 includePluginResolvers should work for coursier resolutions 2022-03-27 00:06:55 -04:00
eugene yokota 2962b088a0
Merge pull request #6814 from prolativ/scala-release-flag
Add support for Scala 3 -scala-output-version flag
2022-03-26 23:36:16 -04:00
Michał Pałka 1e89d71311 Add support for scala-output-version flag in Scala 3 2022-03-24 15:35:57 +01:00
Adrien Piquerez f0552e4bc3
Merge pull request #6830 from kpodsiad/feat/scala-test-classes-framework
feat: add optional framework field to the bsp
2022-03-16 08:56:10 +01:00
Kamil Podsiadlo ce978a19ed tests: add test case for framework field in scala test classes request 2022-03-10 19:56:49 +01:00
Adrien Piquerez 1396e1605d Try fix CI: Build and test (6) 2022-03-08 18:19:20 +01:00
Kamil Podsiadlo 23b50688ba feat: add optional framework field to the bsp 2022-03-04 10:53:25 +01:00
eugene yokota c7f2c046b6
Merge pull request #6816 from Nirvikalpa108/fix-6802
Fixes parsing command args that include quotes but don't start with them
2022-02-04 14:42:22 -05:00
Amina Adewusi ca8fd354bd Fixes parsing command args quote problem
Fixes #6802.
2022-02-04 17:52:39 +00:00
Eugene Yokota ed022a70ac sbt 1.6.2 2022-01-31 23:25:20 -05:00
eugene yokota 567fd8b60b
Merge pull request #6808 from eed3si9n/wip/lm
[1.6.x] Make License object available
2022-01-31 22:47:04 -05:00
eugene yokota 611b8cf01b
Merge pull request #6807 from eed3si9n/bport/6803
[1.6.x] fix: propagate `InterruptedException` from JLine.readLine
2022-01-31 22:11:10 -05:00
Eugene Yokota 761ad14267 Make License object available
Fixes #1937
Ref https://github.com/sbt/librarymanagement/pull/395
2022-01-31 22:00:54 -05:00
tpetillot 4f9fe2af64 fix: propagate `InterruptedException` from JLine.readLine
Motivation:
Cannot exit from InteractionService.readLine

Modification:
Remove try/catch of InterruptedException mapped to None in JLine.readLine
2022-01-31 21:40:32 -05:00