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

TODO for ClassGraph-5.x #668

Open
lukehutch opened this issue Mar 28, 2022 · 0 comments
Open

TODO for ClassGraph-5.x #668

lukehutch opened this issue Mar 28, 2022 · 0 comments

Comments

@lukehutch
Copy link
Member

lukehutch commented Mar 28, 2022

  • Split code into separate libraries (retaining ScanResult for lifetime of application #667):
    • classgraph-classpath:
      • Walks the stack to find classloaders
      • Obtains classpath elements from classloaders using reflection, producing a list of paths
      • Enumerates all resources in all classpath elements
    • classgraph-vfs:
      • Fast multithreaded zipfile parser
      • Move all work queue and singleton map code to this project
      • Closes resources if they are unused for a specified number of seconds; re-opens resources as needed.
      • Still need to implement Closeable interface, since shutdown hooks and finalizers are so broken
    • classgraph-scanner:
      • Scans classfiles found in a resource list to produce ClassInfo objects etc.
      • Remove custom JSON serialization from ScanResult. People can use Jackson if they need to.
  • Remove classloading code (ClassInfo#loadClass(), AnnotationInfo#loadClassAndInstantiate(), etc.)
    • Classloading should be the user's responsibility, not ClassGraph's responsibility -- classloading has resulted in too many weird bugs to do with classes being loaded into the wrong classloader
    • Also by removing all classloading support, a ScanResult no longer needs to keep resources open
      • However, ScanResult should not contain references to Resource objects anymore -- there should be a separate scanning process for resources and classes.
  • Remove JDK 7 support? Replace inner classes with lambdas
  • Remove deprecated APIs
  • See bugs asking for behavioral changes (External classes are included by default in upwards scan #463, Looking up annotations (also) reports annotations of annotations #559)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant