question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unused import warning

See original GitHub issue

Currently, we add all the encoder imports without taking into account if they are needed. That causes a lot of warning messages like the following:

[warn] /Users/fede/development/workspaces/47deg/mu/modules/server/src/test/scala/protocol/Utils.scala:77:6: Unused import
[warn]     @service(Protobuf) trait ProtoRPCService[F[_]] {

It’d be nice to find a way of hiding those messages, by only adding the import when it’s necessary or by adding some flag.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
pepegarcommented, Dec 14, 2018

Yeah, I think these warnings got introduced (by me) in the rewrite to paradise macros.

Lately, in droste macros I’ve been using FQCN, for avoiding imports and requiring implicits through method params instead of importing the whole package, I think it’s a better approach

0reactions
fedefernandezcommented, Dec 17, 2018

oh, thanks for trying

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rust: Unused import warnings · Issue #6191 · google/flatbuffers
Is it possible to get rid of the irritating "unused import" warnings other than #![allow(dead_code)] (crate-level disable)?.
Read more >
unused imports warning funkyness : r/rust - Reddit
Unless I am missing something, it appears that the unused imports warning is incorrect. Take the following code: use std::io::BufReader; use…
Read more >
How to allow dead_code and unused_imports for dev builds ...
The unused imports and dead code warnings are the most common that I've found while learning Rust, and they get annoying after awhile...
Read more >
4.8. Warnings and sanity-checking - downloads for Haskell.org
Report any modules that are explicitly imported but never used. However, the form import M() is never reported as an unused import, because...
Read more >
Unused imports warning - Question - Scala Users
Is there a Scala 3 compiler option to report unused imports? I tried -Wunused:all , but nothing is reported. I believe -Xlint did...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found