Skip to content

build: add plugins JSON build script #5793

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

Merged
merged 3 commits into from
Feb 14, 2024

Conversation

bastimeyer
Copy link
Member

@bastimeyer bastimeyer commented Jan 21, 2024

Ref #4741
Part 1/x


This adds the plugins JSON build script + setuptools hook, and a CI test job for it.

The build script parses each plugin file and reads the pluginmatcher and pluginargument data by walking the module's abstract syntax tree. The result is the JSON-serialized pluginmatcher and pluginargument data of each plugin without having to install Streamlink and import any plugin modules. There are many cases though where parsing could fail, depending on the plugin implementation, for example because object references are not supported. That's why the pluginmatcher and pluginargument data is now defined very strictly.

The next step (different PR) will be implementing the session and CLI logic for reading the JSON and loading only the matching plugin module based on that.

@bastimeyer bastimeyer added WIP Work in process build config labels Jan 21, 2024
@bastimeyer
Copy link
Member Author

bastimeyer commented Jan 21, 2024

@bastimeyer
Copy link
Member Author

Rebased to master... Going to open the lazy plugins loader PR now with these changes included. Once everything's validated and potential issues resolved, this PR here will get merged first, then the lazy plugins loader PR will be rebased and merged after that.

@bastimeyer bastimeyer removed the WIP Work in process label Feb 11, 2024
@bastimeyer bastimeyer marked this pull request as ready for review February 13, 2024 14:27
@bastimeyer bastimeyer merged commit ebb49d3 into streamlink:master Feb 14, 2024
@bastimeyer bastimeyer deleted the plugins-json branch February 14, 2024 12:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant