From caa3e913426134217247ce5b7a6b768127ae2b74 Mon Sep 17 00:00:00 2001 From: l3r8yJ Date: Sun, 14 Apr 2024 16:55:29 +0300 Subject: [PATCH 1/4] docs(2390): rethinking puzzle --- .../java/org/eolang/maven/TranspileMojo.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java index 3e43565215..718579b5a2 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java @@ -58,6 +58,16 @@ /** * Compile. * + * @todo #2375:90min. + * Implement mechanism for "inner" and "outer" classes. + * To get rid of TranspileMojo#cleanUpClasses, we can implement mechanism, + * that will mark classes of the project like "inner", which is will be checked + * during the compilation process. + * Also here is one more solution, it's create analog of gradle `implementation` and `api`, + * - implementation – just includes the dependency + * - api – allows to users of our API to use dependency which was added to project via `api` keyword + *

+ * More about api and implementation here * @since 0.1 */ @Mojo( @@ -246,7 +256,7 @@ private List 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: * eo-strings example * 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 @@ -265,12 +275,6 @@ private List 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: - * Post */ private void cleanUpClasses(final Collection java) { final Set unexpected = java.stream() From 873f29c0a5faaaf55d89b0adc325bb0267ed57f4 Mon Sep 17 00:00:00 2001 From: l3r8yJ Date: Sun, 14 Apr 2024 17:20:41 +0300 Subject: [PATCH 2/4] docs(2390): rethinking puzzle --- .../java/org/eolang/maven/TranspileMojo.java | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java index 718579b5a2..e6821a23cc 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java @@ -58,16 +58,6 @@ /** * Compile. * - * @todo #2375:90min. - * Implement mechanism for "inner" and "outer" classes. - * To get rid of TranspileMojo#cleanUpClasses, we can implement mechanism, - * that will mark classes of the project like "inner", which is will be checked - * during the compilation process. - * Also here is one more solution, it's create analog of gradle `implementation` and `api`, - * - implementation – just includes the dependency - * - api – allows to users of our API to use dependency which was added to project via `api` keyword - *

- * More about api and implementation here * @since 0.1 */ @Mojo( @@ -274,6 +264,15 @@ private List transpile( * In other words, concurrent file deletions on the Windows OS can lead to an * {@link java.nio.file.AccessDeniedException}, which could crash the build. * _____ + * @todo #2375:90min. Implement mechanism for "inner" and "outer" classes. + * To get rid of TranspileMojo#cleanUpClasses, we can implement mechanism, + * that will mark classes of the project like "inner", which is will be checked + * during the compilation process. + * Another solution is to create analog of gradle `implementation` and `api`, + * - implementation – just includes the dependency for inner usage + * - api – allows to users of API to + * use dependency which was added to project via `api` keyword + *

More about api and implementation here * @param java The list of java files. */ private void cleanUpClasses(final Collection java) { From d07dce4325f5f058fee00d507cccb6cf18f59924 Mon Sep 17 00:00:00 2001 From: l3r8yJ Date: Sun, 14 Apr 2024 17:31:10 +0300 Subject: [PATCH 3/4] fix(#2390): qulice fixes --- .../src/main/java/org/eolang/maven/TranspileMojo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java index e6821a23cc..bb573526f0 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java @@ -264,16 +264,16 @@ private List transpile( * In other words, concurrent file deletions on the Windows OS can lead to an * {@link java.nio.file.AccessDeniedException}, which could crash the build. * _____ + * @param java The list of java files. * @todo #2375:90min. Implement mechanism for "inner" and "outer" classes. * To get rid of TranspileMojo#cleanUpClasses, we can implement mechanism, * that will mark classes of the project like "inner", which is will be checked * during the compilation process. * Another solution is to create analog of gradle `implementation` and `api`, - * - implementation – just includes the dependency for inner usage - * - api – allows to users of API to - * use dependency which was added to project via `api` keyword + * - implementation – just includes the dependency for inner usage + * - api – allows to users of API to + * use dependency which was added to project via `api` keyword *

More about api and implementation here - * @param java The list of java files. */ private void cleanUpClasses(final Collection java) { final Set unexpected = java.stream() From d6b8391c13e87e9cb8a539e1cf8a6ab3880cb7ca Mon Sep 17 00:00:00 2001 From: l3r8yJ Date: Mon, 15 Apr 2024 23:55:32 +0300 Subject: [PATCH 4/4] chore(#2390): review fixes --- .../java/org/eolang/maven/TranspileMojo.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java index bb573526f0..bbe8f468f6 100644 --- a/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java +++ b/eo-maven-plugin/src/main/java/org/eolang/maven/TranspileMojo.java @@ -265,15 +265,18 @@ private List transpile( * {@link java.nio.file.AccessDeniedException}, which could crash the build. * _____ * @param java The list of java files. - * @todo #2375:90min. Implement mechanism for "inner" and "outer" classes. - * To get rid of TranspileMojo#cleanUpClasses, we can implement mechanism, - * that will mark classes of the project like "inner", which is will be checked - * during the compilation process. - * Another solution is to create analog of gradle `implementation` and `api`, - * - implementation – just includes the dependency for inner usage - * - api – allows to users of API to - * use dependency which was added to project via `api` keyword - *

More about api and implementation here + * @todo #2375:90min. Implement a mechanism for "internal" and "external" classes. + * - "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` + *

More about api and implementation here */ private void cleanUpClasses(final Collection java) { final Set unexpected = java.stream()