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

fix sub-command merges directives accepting lists of values into super-long lines #3409

Open
Gedochao opened this issue Jan 10, 2025 · 0 comments
Assignees
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 running the fix sub-command's built-in rules, directives from multiple files are migrated into the project.scala configuration file.
When a directive key accepting multiple values (i.e. //> using dep) is repeated across the project, Scala CLI will merge it into a single directive.
The resulting directive can then be unreasonably long.

To Reproduce
given

// file1.scala
//> using dep com.lihaoyi::os-lib:0.9.1
// file2.scala
//> using dep com.lihaoyi::pprint:0.8.0
//file3.scala
//> using  dep org.scala-lang::scala3-compiler:3.6.2

the resulting project.scala looks like this:

// Main
//> using dependency "com.lihaoyi::os-lib:0.9.1"  "com.lihaoyi::pprint:0.8.0" "org.scala-lang::scala3-compiler:3.6.2"

Expected behaviour
Directives in project.scala should hold to a reasonable line length after migrating with fix.

@Gedochao Gedochao added bug Something isn't working UX experimental Tickets tied to experimental features. 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 self-assigned this 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
Status: To do
Development

No branches or pull requests

1 participant