Skip to content

keep inputstream source when genrating from the plugin - #186

Open
glelouet wants to merge 3 commits into
phax:masterfrom
glelouet:keeping_is_source
Open

keep inputstream source when genrating from the plugin#186
glelouet wants to merge 3 commits into
phax:masterfrom
glelouet:keeping_is_source

Conversation

@glelouet

@glelouet glelouet commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Instead of getting a stream of inputstream, we also get their source information, if any.

That source information is transmitted down to the generators, so they can use it, eg to deduce class name based on the file.

It is also printed on error, to know which file / url generated the issue.

Now the source responsible is returned in the error
@glelouet
glelouet requested a review from phax August 30, 2026 01:49
@glelouet

Copy link
Copy Markdown
Collaborator Author

sorry, should be draft, I realize the pair is not transmitted to the generator which could use that information

@glelouet
glelouet marked this pull request as draft August 30, 2026 01:51
@glelouet
glelouet marked this pull request as ready for review August 30, 2026 02:03
@glelouet

Copy link
Copy Markdown
Collaborator Author

I made a PR rather than a discussion for this one. The reason is that I was thinking how to do that before, and how it could help the generators.

@glelouet glelouet changed the title plugin sources are kept with the inputstream keep inputstream source when genrating from the plugin Aug 30, 2026
@phax

phax commented Aug 30, 2026

Copy link
Copy Markdown
Owner

I have the concept of IReadableResource in my ph-io base library - with ClassPathResource, FileResource and URLResource with the sanity methods for InputStream and Reader - please have a look

@glelouet

Copy link
Copy Markdown
Collaborator Author

Can't find the repo. Can you link @phax ?
Or better, change the PR to incorporate your idea instead.

@phax

phax commented Aug 31, 2026

Copy link
Copy Markdown
Owner

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

Successfully merging this pull request may close these issues.

2 participants