Sbt 1.4.0 and lagomKafkaEnabled

When updating from sbt 1.3.6 to 1.4.0 we now have a lint warning in the console:

[warn] there's a key that's not used by any other settings/tasks:
[warn] * ThisBuild / lagomKafkaEnabled
[warn]   +- /Users/X/services/application/build.sbt:7
[warn] note: a setting might still be used by a command; to exclude a key from this `lintUnused` check
[warn] either append it to `Global / excludeLintKeys` or call .withRank(KeyRanks.Invisible) on the key

It’s unclear if the documentation needs to be updated for how this key should be defined, or if the Lagom SBT plugin needs to be updated in some way to prevent this lint warning from happening.

This is just sbt 1.4 warning about a situation that was previously present (unused setting), most likely. You can eliminate the warning as indicated in the note:

to exclude a key from this lintUnused check either append it to Global / excludeLintKeys or call .withRank(KeyRanks.Invisible) on the key

That setting is used, though (without it, embedded Kafka will start up). I don’t think it’s used by a command, I believe it is used by a task in the Lagom SBT plugin. This indicates to me that either there is a bug in SBT which is not detecting that the key is actually being used, or something is configured wrong in the Lagom SBT plugin.

Yes, that’s entirely possible that sbt is not recognizing the use of the setting key. File an issue against sbt if you think that’s the case. I have many of these in my projects and it isn’t worth the investigation time so I just use the excludeLintKeys feature to eliminate the warning. I run into this a lot with the sbt-buildinfo plugin.

Yeah, I would like to respect lint warnings… otherwise they are just noise. But I understand. I, too, am just ignoring it for now.

I have left a note on this issue, which seems to be related: