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

import to fix local build failure #277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

samspills
Copy link
Contributor

Without this import, loading the build locally would fail with the following:

/Users/sam_1/src/github.com/http4s/sbt-http4s-org/build.sbt:14: error: No implicit for Remove.Value[explicitdeps.ModuleFilter, sbt.librarymanagement.ModuleFilter] found,
  so sbt.librarymanagement.ModuleFilter cannot be removed from explicitdeps.ModuleFilter
    unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "sbt-typelevel"),
                                    ^
sbt.compiler.EvalException: Type error in expression

I'm not sure why it hasn't been failing in CI though?

@samspills samspills self-assigned this Oct 23, 2024
@armanbilge
Copy link
Member

Huh, this is so weird. I can't reproduce locally.

$ sbt -version
sbt version in this project:    1.10.3
sbt script version: 1.10.3

@rossabaker
Copy link
Member

I can reproduce it going back to the commit that added it. I don't have any working theory why.

@samspills
Copy link
Contributor Author

Just for reference, I have the same versions on this branch, and on main I get

❯ sbt -version
/Users/sam_1/src/github.com/http4s/sbt-http4s-org/build.sbt:14: error: No implicit for Remove.Value[explicitdeps.ModuleFilter, sbt.librarymanagement.ModuleFilter] found,
  so sbt.librarymanagement.ModuleFilter cannot be removed from explicitdeps.ModuleFilter
    unusedCompileDependenciesFilter -= moduleFilter("org.typelevel", "sbt-typelevel"),
                                    ^
sbt.compiler.EvalException: Type error in expression
[warn] Project loading failed: (r)etry, (q)uit, (l)ast, or (i)gnore? (default: r)
sbt script version: 1.10.3

I was getting 1.10.2 for the script version originally, but I updated and I'm still getting the error so I don't think that was the cause of anything.

@armanbilge
Copy link
Member

Do you have some global sbt plugins configured? That's the only other thing I can imagine would be affecting your environment.

@samspills
Copy link
Contributor Author

I do, I have sbt-dependency-graph, sbt-updates, and sbt-vimquit

@rossabaker
Copy link
Member

I've isolated it to a global sbt-updates.

@samspills
Copy link
Contributor Author

samspills commented Oct 23, 2024

Huh. I couldn't remember why I'd added sbt-updates so I deleted that one, and the error went away. Adding it back in reproduces. @rossabaker do you have that plugin also?

yeah, he does 😆

@rossabaker
Copy link
Member

And here's why. The two implicits have the same name.

@samspills
Copy link
Contributor Author

I think it still makes sense to move forward with adding the import, right? It's not going to cause a problem to have it, and it'll prevent stumbling for folks who do have a global sbt-updates set up.

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A better solution would be to get the upstream plugins to rename theirs, but I don't think this hurts anything in the interim, and it helps at least two of us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants