Open maurxce opened 1 month ago
If I annotate the PlaceholderHook
class directly, I get the error mentioned in https://github.com/FairyProject/fairy/issues/168
This was a follow-up issue, seemingly caused by #168 Annotating methods works fine.
This time the problem happened with an empty constructor.
@Configuration
public class DependencyProvider {
@InjectableComponent
public PlaceholderWrapper createPlaceholderWrapper() {
return new PlaceholderWrapper();
}
}
It seems as if all my @Configuration
s just broke overnight
Edit: I didn't notice that I used the same example class as when I created the issue. This also happened with other configurations, but seems to work if classes get annotated directly
@Configuration
public class ItemProvider {
@InjectableComponent
public ItemFactory createItemFactory(Processor processor) {
return new ItemFactory(processor);
}
}
@Configuration
public class ProcessorProvider {
@InjectableComponent
public Processor createProcessor(PlaceholderWrapper placeholderWrapper) {
return new Processor(placeholderWrapper);
}
}
Can you send the error here if any? if there is no args constructor in the configuration, it shouldn't throw any error.
Can you send the error here if any?
It's the same error as shown in the issue description (just for the other classes as well), which is why I reopened this.
The behavior is pretty odd, sometimes the configurations work and other times they don't. I wasn't able to find any pattern myself, so I just stopped using configurations wherever possible at this point
It sounds quite odd as I hasn't face the issue in any of my project, can you try to replicate a minimal reproducible project and send it here?
I can try to do that, it just might take a while since it's pretty inconsistent from what I've seen
This does not happen when I annotate the
PlaceholderHook
class directly, but I can't do that since PlaceholderAPI is a softdepend