Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test.dep directives aren't migrated from test scope files by fix #3410

Open
Gedochao opened this issue Jan 10, 2025 · 0 comments
Open

test.dep directives aren't migrated from test scope files by fix #3410

Gedochao opened this issue Jan 10, 2025 · 0 comments
Labels
bug Something isn't working experimental Tickets tied to experimental features. subcommand:fix issues tied to the `fix` sub-command. UX
Milestone

Comments

@Gedochao
Copy link
Contributor

Version(s)
d8b3313 / 1.5.4-94-gd8b33133f-SNAPSHOT

Describe the bug
When migrating directives with fix sub-command built-in rules, //> using dep directives from test scope files get migrated to //> using test.dependency directives in project.scala. However, inconsistently with that, //> using test.dependency` directives from test scope files don't get migrated at all.

To Reproduce
given

//> main.scala
//> using test.dependency "com.lihaoyi::os-lib:0.9.3"

and

//> smth.test.scala
//> using test.dependency org.scalatest::scalatest::3.2.9
//> using dep com.lihaoyi::pprint:0.9.0

when running

scala-cli fix . --power
# Some utilized features are marked as experimental:
#  - `fix` sub-command
#  - `--enable-scalafix=false` option
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Running built-in rules...
# Writing project.scala
# Removing directives from smth.test.scala
#   Keeping:
#     //> using test.dependency org.scalatest::scalatest::3.2.9
# Built-in rules completed.

the resulting project configuration looks like this:

// project.scala
// Test
//> using test.dependency "com.lihaoyi::os-lib:0.9.3" "com.lihaoyi::pprint:0.9.0"

with one of the directives in smth.test.scala being kept back:

//> using test.dependency org.scalatest::scalatest::3.2.9

Expected behaviour
All //> using test.dependency directives should get migrated in this case.

@Gedochao Gedochao added bug Something isn't working UX subcommand:fix issues tied to the `fix` sub-command. labels Jan 10, 2025
@Gedochao Gedochao added this to the v1.6.0 milestone Jan 10, 2025
@Gedochao Gedochao added the experimental Tickets tied to experimental features. label Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working experimental Tickets tied to experimental features. subcommand:fix issues tied to the `fix` sub-command. UX
Projects
None yet
Development

No branches or pull requests

1 participant