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
Link the sources in the build properties instead of copy by ant #1035
Link the sources in the build properties instead of copy by ant #1035
Conversation
What will happen when you do File -> Import... -> Plug-in Development -> Plug-ins and Fragments? It's kind of disrupting to me to see paths that assume something about the underling filesystem structure of these things. That doesn't feel right to me. Even the structured editor would never allow one to create such a result... |
I'm not sure I understand?
SWT is/was always special in this regards and we try to transform it into something more usable/standard so I don't see the real issue compared to the old state that didn't worked quite standard anyways...
??? I don't understand we don't have Ui for everything... |
By the way just to make sure if its unclear, this does not add anything "new" but accounts for the fact that these folders are already linked in the |
Well actually you can't specify anything in the UI as this is flagged as a "custom build" :-)
Well yes it looks flat but as you can see in the tiny little blue icon on the folders they are linked resources
that actually link to "their physical (and invisible) location in the file system" :-) |
I'm actually not convinced this is really beneficial. Of course copying the sources is not the most elegant way to solve this, but it is working for the current master and even the API-checks about to be implemented for SWT in #1011 work since the sources are available in the And as mentioned in #1031 (comment) I see no real problems with the current approach. Further I'm about to rework the fragment projects to be mainly based on maven and the bnd-maven-plugin in order to generate the fragments manifest. |
f77927e
to
971994b
Compare
Then it won't be a problem to delete them but until then I want to get rid of as much ant / script /whatever magic when there is a standard solution and these pathes are not really "maintained" for years now so I don't see any issues with that. Copy stuff around an making the build work different than in the IDE will just create surprise and making analyze things more complex. |
It obviously does not discover the sources in all cases, I'm about to analyze that but API Checks are very sensitive to the project layout of Eclipse + Build matches and I don't want to get surprised by some magic (and avoidable) copy thing that make things break. |
Just to maybe make it more clear, currently you see this in the logs:
so if you look more closeley you will see that API tools uses the "linked" path here:
in the complie logs you will find that the copied path is used:
so these two path do not match (from the API / compiler POV), so I would like them to match so I then probabbly can just use the full resolved location in the report and it then should fully work to match them! |
971994b
to
3de088e
Compare
3de088e
to
623c8ce
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so these two path do not match (from the API / compiler POV), so I would like them to match so I then probabbly can just use the full resolved location in the report and it then should fully work to match them!
OK, that and the potential abandoned src
folder in the workspace after a local build are an advantage for me.
When I continue to rework the fragment projects to be Maven-first projects then the src-locations can be defined in a unified way in the binaries/pom.xml
using profiles and the maven-build-helper-plugin:add-source goal to assemble the lists per platform only once.
I further removed now unused code in the CollectSources java script and removed the now unused ant-task. Furthermore I reviewed the source..
lists in the build.properties in detail and they all match the corresponding .classpath
.
In general I think it would be nice to have some kind of macro/reference/variables ${project_classpath_sourceFolders} or alike that injects the paths of all src
-entries in the .classpath file as list. This would especially be convenient for plugin-projects with multiple source folders.
Regarding Ed's concern that this setup is nothing one can create through the Editor:
That's right, but I agree with Christoph that this the SWT configuration is special already anyways. And at the same time there are no warnings, so nothing a developer should disturb.
Lets see how this works out...