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

[apitools] BaseApiAnalyzer should have a way to discover the source without a java project #785

Open
laeubi opened this issue Oct 7, 2023 · 1 comment

Comments

@laeubi
Copy link
Contributor

laeubi commented Oct 7, 2023

I'm currently working on an enhance ApiTools Mojo that works on the build jar file and therefore does not require recompilation of the whole project for API analysis with potentially different settings (see for example #782).

This already works quite well but has the problem that org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer currently requires the source for some features (e.g. giving the location of the API problem).

See for example org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.createCompatibilityProblem(IDelta, IApiComponent, IApiComponent) or org.eclipse.pde.api.tools.internal.builder.BaseApiAnalyzer.checkSinceTags(Delta, IApiComponent)

What I would like to have is a way to tell the BaseApiAnalyzer (e.g. with a method setComponetnSource(...)) where the source is located and then the AST is used (I can also supply the full classpath if that would be required) instead of a full java project.

Another approach would be to construct a complete new java project from the existing one but I currently don't see how this can be archived without triggering all kind of unwanted stuff e.g. compilation, execution of additional builders and so on. Currently
ApiAnalysisApplication do so by performing a lot of non trivial operations including restoring project states and of course it always requires a .project file in the version control system.

@iloveeclipse @vik-chand can you probably help here?

@laeubi
Copy link
Contributor Author

laeubi commented Oct 8, 2023

I even wonder if one can discover the line/name from the class debug symbols as well...

@laeubi laeubi changed the title BaseApiAnalyzer should have a way to discover the source without a java project [apitools] BaseApiAnalyzer should have a way to discover the source without a java project Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant