eclipse-jdt / eclipse.jdt.debug

Eclipse Public License 2.0
16 stars 46 forks source link

Evaluate "without_test_code" when resolving the runtime classpath #327 #328

Closed oleosterhagen closed 9 months ago

oleosterhagen commented 11 months ago

When resolving the runtime classpath for project dependencies the attribute "without_test_code" has to be evaluated so that paths marked as test code from the included project do not contribute to the classpath. The contained classes or resources should not be accessible (e.g. via reflection).

What it does

Fixes https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/327

How to test

The example in https://github.com/eclipse-jdt/eclipse.jdt.debug/issues/327 can be used to reproduce the problem.

Author checklist

oleosterhagen commented 9 months ago

@SarikaSinha Thank you for looking at my pull request.

Does my explanation above help?

SarikaSinha commented 9 months ago

@SarikaSinha Thank you for looking at my pull request.

Does my explanation above help?

Yes, I was able to understand this point but this was not going well with the Help document which describes "Without Test Code". @jarthana will be putting a PR to correct it and then I can merge this.

oleosterhagen commented 9 months ago

Thank you. I think you mean this place:

https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/974b10d805dc2f2502ec9bf769536f9644edee62/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm#L215

When this is set to 'No', test code from the referenced project is not visible when compiling test code in the current project.

This should actually corrected to 'Yes'.

SarikaSinha commented 9 months ago

Thank you. I think you mean this place:

https://github.com/eclipse-platform/eclipse.platform.releng.aggregator/blob/974b10d805dc2f2502ec9bf769536f9644edee62/eclipse.platform.common/bundles/org.eclipse.jdt.doc.user/reference/ref-properties-build-path.htm#L215

When this is set to 'No', test code from the referenced project is not visible when compiling test code in the current project.

This should actually corrected to 'Yes'.

PR is merged now with updated document. By mistake I created merge branch, Can you update it without merge commit to be able to proceed?

oleosterhagen commented 9 months ago

I have updated the branch.