Commit Graph
601 Commits
Author SHA1 Message Date
Eugene Yokota 4521f43995 Support debug output for macros
It's sometimes useful to get the output of the macro-generated code.
This adds a mechanism to allow plugins.sbt to pass in scalacOptions,
which we can later check from the macro.

1. -Xmacro-settings:sbt:Vprint prints out the code.
2. Adding -Xmacro-settings:sbt:print-tree-structure prints out the tree structure.
2025-05-27 00:58:41 -04:00
Eugene Yokota 3b4547718e Remove deprecated methods 2025-05-11 05:23:41 -04:00
xuwei-k 5d660ab8b5 remove unnecessary case
- https://github.com/xuwei-k/scalafix-rules/blob/3ca36335057154ef4431fee464a86b721013d334/rules/src/main/scala/fix/RemoveParameterUntuplingCase.scala
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling.html
- https://docs.scala-lang.org/scala3/reference/other-new-features/parameter-untupling-spec.html
2025-02-22 08:48:29 +09:00
Eugene Yokota cb63de6574 Merge branch '1.10.x' into wip/merge-1.10.x 2025-02-10 02:43:30 -05:00
Eugene Yokota a75e847a08 refactor: Refactor response handler
**Problem**
The sbtn response handling code is relatively stragightforward,
but it's a bit messy.

**Solution**
This cleans it up a bit, similar to the style used by Unfiltered
back then (not sure how Unfiltered plans are written nowadays) by
expressing each event handling as a partial function, and composing them
together using `orElse`.
2025-02-09 18:17:02 -05:00
Josh Soref 613eb86447 Spelling (#8028)
* spelling: 1.x

Signed-off-by: Josh Soref <[email protected]>

* spelling: a

Signed-off-by: Josh Soref <[email protected]>

* spelling: aether

Signed-off-by: Josh Soref <[email protected]>

* spelling: anymore

Signed-off-by: Josh Soref <[email protected]>

* spelling: artifact

Signed-off-by: Josh Soref <[email protected]>

* spelling: available

Signed-off-by: Josh Soref <[email protected]>

* spelling: be

Signed-off-by: Josh Soref <[email protected]>

* spelling: bridge

Signed-off-by: Josh Soref <[email protected]>

* spelling: cannot

Signed-off-by: Josh Soref <[email protected]>

* spelling: case-insensitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: checksum

Signed-off-by: Josh Soref <[email protected]>

* spelling: class loads

Signed-off-by: Josh Soref <[email protected]>

* spelling: contra

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependencies

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependency

Signed-off-by: Josh Soref <[email protected]>

* spelling: dependent

Signed-off-by: Josh Soref <[email protected]>

* spelling: deriveds

Signed-off-by: Josh Soref <[email protected]>

* spelling: describes

Signed-off-by: Josh Soref <[email protected]>

* spelling: early

Signed-off-by: Josh Soref <[email protected]>

* spelling: enclosed

Signed-off-by: Josh Soref <[email protected]>

* spelling: evaluation

Signed-off-by: Josh Soref <[email protected]>

* spelling: excluding

Signed-off-by: Josh Soref <[email protected]>

* spelling: execution

Signed-off-by: Josh Soref <[email protected]>

* spelling: for

Signed-off-by: Josh Soref <[email protected]>

* spelling: frequently

Signed-off-by: Josh Soref <[email protected]>

* spelling: github

Signed-off-by: Josh Soref <[email protected]>

* spelling: green

Signed-off-by: Josh Soref <[email protected]>

* spelling: https://www

Signed-off-by: Josh Soref <[email protected]>

* spelling: https

Signed-off-by: Josh Soref <[email protected]>

* spelling: in-sourcing

Signed-off-by: Josh Soref <[email protected]>

* spelling: include

Signed-off-by: Josh Soref <[email protected]>

* spelling: incompatible

Signed-off-by: Josh Soref <[email protected]>

* spelling: indefinitely

Signed-off-by: Josh Soref <[email protected]>

* spelling: information

Signed-off-by: Josh Soref <[email protected]>

* spelling: inputted

Signed-off-by: Josh Soref <[email protected]>

* spelling: just

Signed-off-by: Josh Soref <[email protected]>

* spelling: lastmodifiedtimes

Signed-off-by: Josh Soref <[email protected]>

* spelling: latest

Signed-off-by: Josh Soref <[email protected]>

* spelling: manifest

Signed-off-by: Josh Soref <[email protected]>

* spelling: miscellaneous

Signed-off-by: Josh Soref <[email protected]>

* spelling: more

Signed-off-by: Josh Soref <[email protected]>

* spelling: neither

Signed-off-by: Josh Soref <[email protected]>

* spelling: never

Signed-off-by: Josh Soref <[email protected]>

* spelling: nonexistent

Signed-off-by: Josh Soref <[email protected]>

* spelling: opted

Signed-off-by: Josh Soref <[email protected]>

* spelling: outputting

Signed-off-by: Josh Soref <[email protected]>

* spelling: params

Signed-off-by: Josh Soref <[email protected]>

* spelling: performance

Signed-off-by: Josh Soref <[email protected]>

* spelling: preceding

Signed-off-by: Josh Soref <[email protected]>

* spelling: presentation

Signed-off-by: Josh Soref <[email protected]>

* spelling: project

Signed-off-by: Josh Soref <[email protected]>

* spelling: projects

Signed-off-by: Josh Soref <[email protected]>

* spelling: protocol

Signed-off-by: Josh Soref <[email protected]>

* spelling: related

Signed-off-by: Josh Soref <[email protected]>

* spelling: representation

Signed-off-by: Josh Soref <[email protected]>

* spelling: res

Signed-off-by: Josh Soref <[email protected]>

* spelling: resolverlist

Signed-off-by: Josh Soref <[email protected]>

* spelling: resolverset

Signed-off-by: Josh Soref <[email protected]>

* spelling: response

Signed-off-by: Josh Soref <[email protected]>

* spelling: returned

Signed-off-by: Josh Soref <[email protected]>

* spelling: sbt_version

Signed-off-by: Josh Soref <[email protected]>

* spelling: scalacheck

Signed-off-by: Josh Soref <[email protected]>

* spelling: sentinels

Signed-off-by: Josh Soref <[email protected]>

* spelling: separates

Signed-off-by: Josh Soref <[email protected]>

* spelling: serves

Signed-off-by: Josh Soref <[email protected]>

* spelling: should

Signed-off-by: Josh Soref <[email protected]>

* spelling: significant

Signed-off-by: Josh Soref <[email protected]>

* spelling: specifically

Signed-off-by: Josh Soref <[email protected]>

* spelling: substitute

Signed-off-by: Josh Soref <[email protected]>

* spelling: suppress

Signed-off-by: Josh Soref <[email protected]>

* spelling: terminal

Signed-off-by: Josh Soref <[email protected]>

* spelling: the

Signed-off-by: Josh Soref <[email protected]>

* spelling: title

Signed-off-by: Josh Soref <[email protected]>

* spelling: transitive

Signed-off-by: Josh Soref <[email protected]>

* spelling: version

Signed-off-by: Josh Soref <[email protected]>

* spelling: versions

Signed-off-by: Josh Soref <[email protected]>

* spelling: want

Signed-off-by: Josh Soref <[email protected]>

* spelling: wanting

Signed-off-by: Josh Soref <[email protected]>

* spelling: whether

Signed-off-by: Josh Soref <[email protected]>

* link: sbt Cached Resolution

Signed-off-by: Josh Soref <[email protected]>

* link: Testing sbt plugins

Signed-off-by: Josh Soref <[email protected]>

---------

Signed-off-by: Josh Soref <[email protected]>
2025-02-04 01:11:28 -05:00
Eugene Yokota 55b1fdeddb fix: Fix Chrome tracing file
**Problem**
We changed the content of Chrome tracing file incorrectly
and renamed tid to tname.

**Solution**
1. This renames tname back to to tid.
2. To retain the fix to avoid Thread#getId, this calls
   either the JDK 8 way or the JDK 19 way reflectively.
2025-01-28 04:11:36 -05:00
eugene yokota a09a724b06 Merge branch 'develop' into ControlEvent-Enumeration 2025-01-05 17:04:57 -05:00
xuwei-k da26f3078b use withFilter instead of filter 2025-01-04 09:10:36 +09:00
xuwei-k 358f2d9fdc use enum instead of scala.Enumeration 2025-01-03 12:07:41 +09:00
eugene yokota 7f86575314 Merge pull request #7999 from xuwei-k/remove-unused-privates 2025-01-02 05:31:56 -05:00
xuwei-k 614d9ce985 remove unused private val and def 2025-01-02 18:48:32 +09:00
xuwei-k 0d0cd2eabf fix typo 2025-01-02 13:52:51 +09:00
eugene yokota 52d36653da Merge pull request #7997 from xuwei-k/scalafmt-convertToNewSyntax
[2.x] update `.scalafmt.conf`. enforce new scala 3 syntax
2025-01-01 22:34:03 -05:00
xuwei-k 13d6626564 update .scalafmt.conf. enforce new scala 3 syntax 2025-01-02 11:25:34 +09:00
xuwei-k a7ba960c17 use enum instead of sealed trait 2025-01-02 10:52:37 +09:00
xuwei-k d7ec1013da remove unused type params 2025-01-01 18:42:59 +09:00
eugene yokota e04039a2ed Merge pull request #7992 from xuwei-k/foreach-map
[2.x] use `foreach` instead of `map`
2025-01-01 03:07:05 -05:00
eugene yokota df6e1bc2aa Merge pull request #7986 from xuwei-k/string-interpolation-format-s
[2.x] use string interpolation instead of `format` method
2025-01-01 03:03:43 -05:00
xuwei-k 580722994a use foreach instead of map 2025-01-01 16:42:25 +09:00
xuwei-k 13563f9d49 use string interpolation instead of format method 2025-01-01 16:02:11 +09:00
xuwei-k a444208b80 remove unnecessary asInstanceOf 2025-01-01 13:32:05 +09:00
xuwei-k f255c38892 use toIntOption instead of scala.util.Try 2024-12-30 13:13:53 +09:00
Eugene Yokota 72c061a2a2 fix: Fixes glob in scripted
**Problem**
Absolute path handling regressed.

**Solution**
Create an absolute glob for expression starting with /.
2024-12-22 01:32:16 -05:00
Eugene Yokota 3d86f30837 Merge branch '1.10.x' into wip/merge-1.10.x 2024-12-16 03:20:10 -05:00
Eugene Yokota e854909592 Use JAVA_HOME when available 2024-12-15 14:59:02 -05:00
Eugene Yokota 0906b2d7ac fix: Use JDK path, not JRE path
**Problem**
There are a few places where javaHome or java path is set,
using java.home system property. The problem is that it points to JRE,
not JDK, so it would break on Java compilation etc.

**Solution**
If the path ends with jre, go up one directory.
2024-12-15 02:47:35 -05:00
Eugene Yokota c4aebf5744 feat: Support glob expressions in scripted
**Problem**
It's currently not easy to write a scripted test that works on
both sbt 1.x and 2.x when you want to write exists test under target.

**Solution**
Since we can only use the file system (and not evaluate Scala version etc)
1. this implements glob expression support in `exists`, `absent`, and `delete`.
2. this also introduces `||` operator that would mean a or b.
2024-12-08 23:40:27 -05:00
Eugene Yokota d21b2d250a feat: Support glob expressions in scripted
**Problem**
It's currently not easy to write a scripted test that works on
both sbt 1.x and 2.x when you want to write exists test under target.

**Solution**
Since we can only use the file system (and not evaluate Scala version etc)
1. this implements glob expression support in `exists`, `absent`, and `delete`.
2. this also introduces `||` operator that would mean a or b.
2024-12-08 23:38:00 -05:00
xuwei-k f11d9d76f0 remove more implicit. use given and using 2024-11-18 14:39:00 +09:00
xuwei-k d193c990d1 remove implicit params. change to using 2024-11-18 06:49:22 +09:00
eugene yokota 312f1a0782 Merge pull request #7888 from xuwei-k/Alternative-CommandBuilder
[2.x] use `extension` instead of `implicit`
2024-11-16 21:03:28 -05:00
xuwei-k 4da8d942ce use extension instead of implicit 2024-11-17 07:38:40 +09:00
friendseeker c47d01738f Remove jansi from WindowsInputStream 2024-11-07 22:08:00 -08:00
Friendseeker b621db683c Remove jansi from WindowsInputStream 2024-11-07 19:15:13 -08:00
adpi2 aa5e252d22 Merge pull request #7866 from adpi2/2.x-reduce-heap
[2.x] Reduce number of long-living instances to speed up loading
2024-11-06 08:44:03 +01:00
Adrien Piquerez 8b5eaa2cd5 Cache delegates during Load 2024-11-04 10:43:42 +01:00
xuwei-k 07ae450e14 delete deprecated methods 2024-11-04 17:26:55 +09:00
Friendseeker 828dc04808 Migrate all usages of System.console == null 2024-10-28 18:25:16 -07:00
Eugene Yokota 56941dac04 refactor: Update Scala 3 syntax 2024-10-27 23:55:30 -04:00
Eugene Yokota 14f7d29afc Contraband 0.7.0 2024-10-27 16:21:18 -04:00
xuwei-k 22f5c798f5 use to{Int, Long, Double}Option methods 2024-10-23 12:22:40 +09:00
xuwei-k ec70bae39a use extension instead of implicit class 2024-10-23 07:05:38 +09:00
Friendseeker 0e85726858 Use JNI to replace deprecated Jansi & JNA 2024-10-22 13:05:20 -07:00
Friendseeker cdab4c10be Scalafmt 2024-10-21 21:38:59 -07:00
Friendseeker b1c4c09a7f Fix bunch more compiler errors 2024-10-21 21:38:59 -07:00
Friendseeker f87ffc8042 Fix CI compile errors 2024-10-21 21:38:59 -07:00
friendseeker e0d9493a93 Bump CI to JDK 21 2024-10-19 21:08:20 -07:00
xuwei-k 6bf5b8b30f Update contraband sources 2024-10-18 20:34:44 +09:00
Friendseeker e35d14aa46 Drop scala212, scala213 for utils 2024-10-11 17:45:59 -07:00