From 942515b1bdb7b3694b7ffef46e3917fede505a28 Mon Sep 17 00:00:00 2001 From: Jack Koenig Date: Mon, 22 Jan 2024 15:33:51 -0800 Subject: [PATCH] Update Scala CLI Template (#3757) * Use "dep" instead of deprecated "lib" * Add _root_ to `import circt.stage.ChiselStage` * Also add comment describing how this disambiguates from chisel3.util.circt when the user does `import chisel3.util._` * Bump versions in Github workflows (cherry picked from commit 589f10672d540d5202ee34df6d869d3b6f0b7340) --- .github/workflows/build-scala-cli-template.yml | 4 ++-- .../workflows/build-scala-cli-template/chisel-template.scala | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-scala-cli-template.yml b/.github/workflows/build-scala-cli-template.yml index 22409c02856..f40788b2700 100644 --- a/.github/workflows/build-scala-cli-template.yml +++ b/.github/workflows/build-scala-cli-template.yml @@ -34,9 +34,9 @@ jobs: - name: Cache Scala-CLI uses: coursier/cache-action@v6 - name: Setup Scala-CLI - uses: VirtusLab/scala-cli-setup@v0.2.1 + uses: VirtusLab/scala-cli-setup@v1 with: - jvm: adoptium:1.17 + jvm: adoptium:17 apps: sbt - name: Generate Scala CLI Template shell: bash diff --git a/.github/workflows/build-scala-cli-template/chisel-template.scala b/.github/workflows/build-scala-cli-template/chisel-template.scala index 4c19081f297..8ae362d0f06 100644 --- a/.github/workflows/build-scala-cli-template/chisel-template.scala +++ b/.github/workflows/build-scala-cli-template/chisel-template.scala @@ -1,11 +1,12 @@ //> using repository "sonatype-s01:snapshots" //> using scala "2.13.12" -//> using lib "org.chipsalliance::chisel::@VERSION@" +//> using dep "org.chipsalliance::chisel::@VERSION@" //> using plugin "org.chipsalliance:::chisel-plugin::@VERSION@" //> using options "-unchecked", "-deprecation", "-language:reflectiveCalls", "-feature", "-Xcheckinit", "-Xfatal-warnings", "-Ywarn-dead-code", "-Ywarn-unused", "-Ymacro-annotations" import chisel3._ -import circt.stage.ChiselStage +// _root_ disambiguates from package chisel3.util.circt if user imports chisel3.util._ +import _root_.circt.stage.ChiselStage class Foo extends Module { val a, b, c = IO(Input(Bool()))