JetBrains / sbt-idea-plugin

Develop IntelliJ plugins with Scala and SBT
Apache License 2.0
97 stars 28 forks source link

`packageArtifact` task does not respect `patchPluginXml` #76

Closed Baccata closed 3 years ago

Baccata commented 3 years ago

Using version 3.7.5 of the sbt-idea-plugin sbt plugin to develop an Intellij Plugin :

When inspecting the output of packageArtifact, the contained plugin.xml has not been patched as expected

Baccata commented 3 years ago

apparently I need to run doPatchPluginXml manually, only after the project has already been compiled, before packaging it ...

This is extremely unintuitive 😞

mutcianm commented 3 years ago

Hi! Patching, by design, should happen automatically before packaging the artifact. Could you please link your plugin repo for me to take a closer look, if it's not private?

Baccata commented 3 years ago

it's currently in PR and part of a larger codebase, but here you go : https://github.com/disneystreaming/weaver-test/pull/74

Baccata commented 3 years ago

Mmm it does seem to work as expected now. I wonder if sbt had some stale cache under the hood that lead to the behaviour I witnessed the other day

mutcianm commented 3 years ago

A message should be printed when you call packageArtifact... task if the patching has actually been performed. [info] Detected plugin xmls, patching: ...

Baccata commented 3 years ago

Yup it does now. when I opened the ticket there was nothing in the message after patching: ... anyhow, I'm okay to close the ticket for now, if the problem re-occurs I'll try to minimise it.