Skip to content

Commit cbc1898

Browse files
committed
scala version bump. subagent setup
1 parent c3cd950 commit cbc1898

File tree

4 files changed

+66
-9
lines changed

4 files changed

+66
-9
lines changed

.claude/agents/scala-expert.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: scala-expert
3+
description: Scala expert specializing in functional programming, type safety, and performance optimization.
4+
model: claude-sonnet-4-20250514
5+
---
6+
7+
## Focus Areas
8+
9+
- Advanced functional programming techniques in Scala
10+
- Type safety and typesafe design patterns
11+
- Immutable data structures and their advantages
12+
- Concurrency and parallelism in Scala
13+
- Efficient collection operations and transformations
14+
- Pattern matching and case classes
15+
- Using Scala's REPL for rapid prototyping
16+
- Implicit classes and extension methods
17+
- Scala's type system: variance, bounds, and constraints
18+
- Utilizing Scala's built-in libraries and features
19+
20+
## Approach
21+
22+
- Prioritize immutability and pure functions
23+
- Emphasize clear and concise code using Scala's features
24+
- Leverage pattern matching for clean conditional logic
25+
- Utilize Scala's powerful type inference capabilities
26+
- Implement tail-recursive solutions to optimize performance
27+
- Employ higher-order functions and combinators effectively
28+
- Explore functional error handling with Try, Option, Either
29+
- Use lazy evaluation to optimize performance where suitable
30+
- Regularly refactor code for clarity and maintainability
31+
- Encourage the use of the latest Scala version to leverage new language features
32+
33+
## Quality Checklist
34+
35+
- Ensure all functions have clear and explicit type signatures
36+
- Validate that code adheres to Scala style guidelines
37+
- Test concurrency implementations for race conditions and deadlocks
38+
- Profile memory usage and optimize where necessary
39+
- Confirm immutability of all data structures in critical code paths
40+
- Ensure proper use of pattern matching without redundancies
41+
- Avoid code smells and anti-patterns specific to Scala
42+
- Ensure comprehensive test coverage with ScalaTest or similar
43+
- Code must compile with no warnings or errors in strict mode
44+
- Verify all custom operators or implicits have clear documentation
45+
46+
## Output
47+
48+
- Idiomatic Scala code adhering to functional programming practices
49+
- Scaladoc comments for all public classes and methods
50+
- Unit tests using Scala's testing frameworks like ScalaTest
51+
- Performance benchmarks for key features and methods
52+
- Code examples demonstrating effective use of Scala features
53+
- Sample applications showing best practices in Scala
54+
- Recommendations for code improvement and optimization
55+
- Reports on type hierarchy and variance effective use
56+
- Scripts for automated building and testing using sbt
57+
- Guidance on evolving existing codebases to Scala best practices

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<properties>
4141
<maven.compiler.source>1.8</maven.compiler.source>
4242
<maven.compiler.target>1.8</maven.compiler.target>
43-
<scala.version>2.13.8</scala.version>
43+
<scala.version>2.13.11</scala.version>
4444
<scala.compat.version>2.13</scala.compat.version>
4545
</properties>
4646

@@ -164,7 +164,7 @@
164164
<dependency>
165165
<groupId>org.scala-lang.modules</groupId>
166166
<artifactId>scala-parser-combinators_${scala.compat.version}</artifactId>
167-
<version>2.1.0</version>
167+
<version>2.3.0</version>
168168
</dependency>
169169
<dependency>
170170
<groupId>fr.acinq.secp256k1</groupId>

src/main/scala/fr/acinq/bitcoin/Protocol.scala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ object Protocol {
214214
writeBytes(input, out)
215215
}
216216

217-
implicit val txInSer = TxIn
218-
implicit val txOutSer = TxOut
219-
implicit val scriptWitnessSer = ScriptWitness
220-
implicit val txSer = Transaction
221-
implicit val networkAddressWithTimestampSer = NetworkAddressWithTimestamp
222-
implicit val inventoryVectorOutSer = InventoryVector
217+
implicit val txInSer: TxIn.type = TxIn
218+
implicit val txOutSer: TxOut.type = TxOut
219+
implicit val scriptWitnessSer: ScriptWitness.type = ScriptWitness
220+
implicit val txSer: Transaction.type = Transaction
221+
implicit val networkAddressWithTimestampSer: NetworkAddressWithTimestamp.type = NetworkAddressWithTimestamp
222+
implicit val inventoryVectorOutSer: InventoryVector.type = InventoryVector
223223

224224
def readCollection[T](
225225
input: InputStream,

src/main/scala/immortan/LNParams.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ object LNParams {
108108
var feeRates: FeeRates = _
109109

110110
var threadPool = Executors.newFixedThreadPool(3)
111-
implicit val ec = new ExecutionContext {
111+
implicit val ec: ExecutionContext = new ExecutionContext {
112112
def execute(runnable: Runnable): Unit = threadPool.submit(runnable)
113113
def reportFailure(t: Throwable): Unit = {}
114114
}

0 commit comments

Comments
 (0)