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

2390 #3090

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

2390 #3090

Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ private List<Path> transpile(

/**
* Clean up dirty classes.
* The method is trying to fix problem produced by dirty libraries:
* The method is trying to fix a problem produced by dirty libraries:
* <a href="https://github.com/objectionary/eo-strings/issues/147"> eo-strings example </a>
* Some libraries by mistake can put ALL their compiled classes right into the final library
* jar, instead of only adding atoms. This can cause different runtime errors since the
Expand All @@ -265,12 +265,18 @@ private List<Path> transpile(
* {@link java.nio.file.AccessDeniedException}, which could crash the build.
* _____
* @param java The list of java files.
* @todo #2375:90min. Add concurrency tests for the TranspileMojo.cleanUpClasses method.
* We should be sure that the method works correctly in a concurrent environment.
* In order to do so we should add a test that will run the cleanUpClasses method in
* multiple threads and check that the method works correctly without exceptions.
* We can apply the same approach as mentioned in that post:
* <a href="https://www.yegor256.com/2018/03/27/how-to-test-thread-safety.html">Post</a>
* @todo #2375:90min. Implement a mechanism for "internal" and "external" classes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@l3r8yJ, could you please provide more context? Imagine someone opening this issue in the future; they should be able to understand what to do at first glance:

  1. I still don't understand why we might need "internal" and "external" classes, or why we need to implement them.
  2. Why should "internal" classes be included in the catalog?
  3. Which specific catalog are you referring to?
  4. Why should "external" classes be placed in a different directory?
  5. Are "catalog" and "directory" the same entities in this context?

* - "internal" classes will be included in the catalog
* - "external" classes will be placed in another directory.
* For example, external classes will be placed in directories
* where the top level will be the name of the package from
* which the object is connected, and the subdirectories
* will indicate the version of this package.
* Another solution is to create an analogue of `implementation` and `api` from gradle:
* - implementation – just includes a dependency for internal use
* - api – allows API users use a dependency that
* was added to the project using the keyword `api`
* <p/><a href="https://stackoverflow.com/a/44419574/11529150">More about api and implementation here</a>
*/
private void cleanUpClasses(final Collection<? extends Path> java) {
final Set<Path> unexpected = java.stream()
Expand Down
Loading