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

Enhance API to Support Stream Inputs for Resource Files #1935

Open
3 tasks
maximiliankaul opened this issue Jan 15, 2025 · 2 comments
Open
3 tasks

Enhance API to Support Stream Inputs for Resource Files #1935

maximiliankaul opened this issue Jan 15, 2025 · 2 comments

Comments

@maximiliankaul
Copy link
Contributor

maximiliankaul commented Jan 15, 2025

All public API methods that accept Files should also accept streams. This enhancement will facilitate the use of the CPG as a library in other JVM projects, enabling better integration with Java's resource management mechanisms.

Benefits:

  • Easier integration with Java projects.
  • Improved flexibility in handling resource files.

To-dos:

  • Update DFGFunctionSummaries API accordingly. @KuechA
  • Compilation database
  • (TranslationManager parse{,Parallel,Sequentially} probably not the best idea to add stream support here, since we rely heavily on the directory structure. And it's hard to imagine a use case where we want to ship the files to be analyzed as resources in the jar.)
@oxisto
Copy link
Member

oxisto commented Jan 15, 2025

Do you have an example?

@maximiliankaul
Copy link
Contributor Author

Do you have an example?

fun fromFiles(files: List<File>): DFGFunctionSummaries {

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

2 participants