Add decade 2020-2029 to copyright years in Checklics
FWIW, I just wanted to know if the tests in module 'build' would still
pass. They did not find copyrights for more recent years, so I added
them here.
But I am still unsure, if we need these tests at all. Obviously, they
were not running during CI builds, i.e. they seem to be non-essential.
But chances are, they were forgotten to be added to the suite.
BTW, running the tests in module 'build' with '-Drun.build.tests=true'
is failing, too, because some old JDK classes looked up there no longer
exist in more recent JDKs.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Avoid "Last updated [timestamp]" footer on each docs page
Set Asciidoctor option 'nofooter' to avoid the annoying timestamps. It
makes updating the website difficult, because always there are "changes"
in each file. Diffing real changes in generated files for the website
before committing becomes difficult. Furthermore, the user does not have
any immediate benefit for most documents, as they change infrequently or
never (e.g. old release notes).
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Globally replace "http:" by "https:" in non-XML files
Maybe, the XML files and Maven wrapper files will follow. First, let us
find out if this breaks the build, maybe some tests are asserting on
"http:". But there, the replacement would also have taken place, so
probably it just works.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Classes and methods named '_' are no longer allowed in ECJ, obviously
also not for old target versions like 1.5. This probably is due to
the added support for unnamed patterns and classes in the latest
upstream JDT Core merge. Therefore, we simply rename '_' to '__'.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Uri Simchoni [Mon, 5 Feb 2024 06:34:35 +0000 (08:34 +0200)]
Store only weaved class names in the generatedClasses map
The generatedClasses map contained both keys of woven classes that had
generated classes associated with them, and the keys of the generated
classes themselves. It seems like this map is never consulted for the
generated class key - the generated class is generated from within the
context of woven class loading / retransformation, and thus no transform
event is generated for it by the JVM. Because of that, we do not need to
guard against re-weaving it. Other uses of generatedClasses map are for
full/empty tests, where the woven class key is sufficient. This change
simplifies deletion of a class because we do not have to look for its
associated generated classes.
Uri Simchoni [Mon, 5 Feb 2024 06:29:32 +0000 (08:29 +0200)]
Remove WeavingAdaptor.couldWeave()
WeavingAdaptor.couldWeave() tested two things: whether this specific
class (by its name) should be excluded from weaving, and whether the
class has generated classes associated with it (in which case we avoid
weaving to avoid re-creating those generated classes). However, if the
class has generated classes associated, couldWeave() is not called at
all because of the new wovenWithGeneratedClass() test, so we have
only the name test which is now called directly.
Uri Simchoni [Sun, 4 Feb 2024 10:51:15 +0000 (12:51 +0200)]
Use previous weaving result if classes were generated during weaving
A parallel-capable class loader might load the same class multiple times
in multiple threads, see
https://docs.oracle.com/javase/7/docs/technotes/guides/lang/cl-mt.html.
In this scenario, the JVM instrumentation mechanism invokes the AspectJ
weaver twice on the same class. In simple weaving scenarios, this would
just cause weaving logic to run multiple times and produce the same
result for each thread, but if the weaver is generating new classes,
it is undesirable to generate those classes multiple times.
To avoid this, the generatedClasses map in WeavingAdaptor keeps track of
classes for which inner classes were generated and avoids re-weaving
them. However, before this change, if a class was found in the generated
map, the weaver would return the un-woven bytes, which would cause
AspectJ not to work for some of the threads.
This change returns the woven bytes instead of re-running weaving.
Uri Simchoni [Sun, 4 Feb 2024 10:46:03 +0000 (12:46 +0200)]
Change value of woven class in generatedClasses map
Store the woven class and not a generated (inner) class as value of the
woven class name. This has no effect in this commit, because the value
is not consulted at all, but will be used later on.
Test "same class woven concurrently in parallel-capable classloader"
reproduces #279. Originally taken and modified from:
https://gitlab.com/urisimchoni/aspectj-parallel-issue
Co-authored-by: Uri Simchoni <urisimchoni@gmail.com> Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
while creating a CDS archive. Afterward, the application can be run in
its woven state from the CDS archive even without '-javaagent', because
the byte code was archived in its woven state ("poor man's AJC"). See
https://github.com/eclipse-aspectj/aspectj/issues/277#issuecomment-1931142753
for details.
Fixes #277.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
On my workstation, more recent JDKs generate partly German javadocs.
Background: Avoid non-English javadoc generation. Due to
https://bugs.openjdk.org/browse/JDK-8222793 reoccurring at least in JDKs
19-21 and also being broken in some older JDKs, we cannot rely on just
setting the locale parameter, but also need the 'user.language' and
'user.country' parameters in 'additionalJOptions' as a workaround.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Always use ":leveloffset: +1" with ":doctype: book"
Headlines per ADOC file should start at level 1, not 2. Adjusting the
level offset for books helps to avoid warnings when including book
chapters, but still allows to also use the chapters as stand-alone
documents.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Remove some old files relating to AspectJ Debugger ajdb
If ajdb ever existed and was part of the product, it must have been 20+
years ago. There are still some references to it in old release notes
and unused Ant and text files, but that is OK for now.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Overhaul ClassLoaderWeavingAdaptor to use statically initialised Unsafe
instances and method handles pointing to their 'defineClass' methods.
Those now work universally on JDKs 8-21. In older JDKs, the method used
to be in sun.misc.Unsafe, in more recent ones on jdk.internal.misc.Unsafe.
It is challenging to fetch instances, especially as reflection
protection and module boundaries have been increased in the JDK
progressively. But finally, a solution was adapted from Byte Buddy (BB).
Kudos to BB author Rafael Winterhalter. The previous solution to use
ClassLoader::defineClass and require '--add-opens' is no longer
necessary for the first time since it became necessary in AspectJ 1.9.7
with Java 16 support.
Add org.ow2.asm:asm-common as a dependency everywhere org.ow2.asm:asm
was used before. Maybe that is too many places, but no worse than before.
Add missing dependency on loadtime to aspectjweaver. This kept a build
like "mvn install -am -pl aspectjweaver" from picking up changed
loadtime classes.
Fixes #117.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Update AJDT update site URLs after project termination
AJDT is now part of the AspectJ project. Hence, both repository and
download area have moved to other URLs. See also:
https://gitlab.eclipse.org/eclipsefdn/emo-team/emo/-/issues/475#note_1612124
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- Redundant copies of HTML files used in AspectJ installer, which
already exist as resource files in module 'build'
- Null-sized AspectJ library JARs which probably were used to trigger
certain build steps in the former Ant build
- BridgeVersion.java.txt, which has been replaced by a regular
org.aspectj.bridge.Version class which can dynamically determine
versions from a properties file instead of relying on them being
hard-coded into the template.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
The former HTML file was moved up one directory level and converted to
asciidoc format. Therefore, include the ADOC file from the correct
location now.
Alternatively, we could have included the generated HTML from the
aj-build/dist/docs/doc directory, but that would have meant adding a
dependency to the 'docs' module to several other modules for this one
file. Actually, asciidoc has become a widely used and accepted format
for documentation and is human-readable by design. Therefore, it is OK
to include the ADOC file. The important thing is that the licence
information
- is contained in each published artifact,
- can be found easily,
- its content is human-readable.
All these requirements are still met with this change. Arguably, ADOC is
easier to read than HTML and does not even need a web browser.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Like the javadocs in aspectjrt and aspectjweaver (if the releas profile
is active), for docs also copy the docs in the package phase to the
aj-dist directory.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
If we ever decide to add Maven site docs to the AspectJ website, now we
can deploy them locally using 'mvn site:deploy' and publish them on a
web server or even incorporate them into the binary distribution in the
installer's belly.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Docs: Create separate CSS files, do not embed into HTML
TODO: There still is one set of CSS files per subdirectory due to the
way the docs directories are organised. It would be better to have them
just once. But to achieve that, the ADOC-to-HTML conversion would have
to be changed, e.g. using one central directory for images and
reorganisation of the overall directory structure and build options.
See https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/729.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Using Asciidoctor Maven, we now produce PDFs (which are also linked to
from the main documentation index page) for
- Programming Guide,
- AspectJ 5 Developer's Notebook,
- Development Environment Guide,
- Problem Diagnosis Guide,
- AspectJ Design Overview.
Attention! PDF generation alone takes 3+ minutes, almost 4 minutes
including asciidoc to HTML conversion. Just deactivate the 'create-docs'
profile if you do not need docs during the build.
Closes #272.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Follow-up on previous rename-only commit. This time, the binaries are
real PNGs. The asciidoc and other references to them have also been
replaced. File figures_classes.png in the teaching materials also was
rotated by 90° to display it correctly.
Background: The Asciidoctor PDF back-end cannot handle GIFs directly
without an additional Ruby Gem. It is easier to only use PNGs and JPEGs.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Fix warning in Asciidoctor Maven by JRuby version bump
Warning "Native subprocess control requires open access to the JDK IO
subsystem" can be avoided by upgrading JRuby, see
https://github.com/asciidoctor/asciidoctor-maven-plugin/issues/553.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Before, only one image was referenced, consisting of a screenshot of two
diagrams. The other image file, containing just one of the diagrams, was
not used. Now, both images have been cropped correctly and are both
referenced separately from the release notes.
Better late than never...
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- AspectJ Browser (ajbrowser)
- Forte IDE integration
- JBuilder IDE integration
- Emacs integration
All this information was old and outdated. Ajbrowser was removed from
AspectJ a while ago. If the other tools even still exist, any possibly
existing AspectJ support is not part of AspectJ itself.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
In one case, we need to copy images from a subdirectory one level up,
because otherwise the images are only found in the included document,
but not in the single-page one including it from the subdirectory. In
all other cases, included ADOCs are located in the same directory as the
including document.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
- The website is just a front page.
- I failed to contact anyone via:
* fb9553b7471df638478bbf918044bf52.gdrp@customers.whoisprivacycorp.com
* info@aosd.net
* admin@aosd.net
- The discuss@aosd.net mailing list had its last post 6 years ago and
the last one concerning AspectJ 11 years ago according to the archive
at https://discuss.aosd.narkive.com/.
Mention Spring support for native AspectJ an Spring AOP as a real world
example in the FAQ.
Also remove an FAQ link to a no longer existing PARC website about
AspectJ and fix a small typo.
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>