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

Update NewPipe Extractor and add new proguard rules #12104

Merged
merged 1 commit into from
Mar 21, 2025
Merged

Update NewPipe Extractor and add new proguard rules #12104

merged 1 commit into from
Mar 21, 2025

Conversation

TobiGr
Copy link
Contributor

@TobiGr TobiGr commented Mar 16, 2025

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

This updates NewPipe Extractor to TeamNewPipe/NewPipeExtractor@0b99100.

I needed to add new Proguard rules to keep a few classes. The upgrade to Rhino 1.8.0 and the new dependency Rhino Engine 1.8.0 introduced in TeamNewPipe/NewPipeExtractor#1256 made this necessary. Otherwise assembleRelease would throw an error. I am unsure whether we could use stricter rules.

Build error
Missing class javax.script.AbstractScriptEngine (referenced from: void org.mozilla.javascript.engine.RhinoScriptEngine.<init>(org.mozilla.javascript.engine.RhinoScriptEngineFactory) and 1 other context)
Missing class javax.script.Bindings (referenced from: javax.script.Bindings org.mozilla.javascript.engine.BindingsObject.bindings and 8 other contexts)
Missing class javax.script.Compilable (referenced from: org.mozilla.javascript.engine.RhinoScriptEngine)
Missing class javax.script.CompiledScript (referenced from: void org.mozilla.javascript.engine.RhinoCompiledScript.<init>(org.mozilla.javascript.engine.RhinoScriptEngine, org.mozilla.javascript.Script) and 3 other contexts)
Missing class javax.script.Invocable (referenced from: org.mozilla.javascript.engine.RhinoScriptEngine)
Missing class javax.script.ScriptContext (referenced from: void org.mozilla.javascript.engine.Builtins.register(org.mozilla.javascript.Context, org.mozilla.javascript.ScriptableObject, javax.script.ScriptContext) and 6 other contexts)
Missing class javax.script.ScriptEngine (referenced from: javax.script.ScriptEngine org.mozilla.javascript.engine.RhinoCompiledScript.getEngine() and 1 other context)
Missing class javax.script.ScriptEngineFactory (referenced from: javax.script.ScriptEngineFactory org.mozilla.javascript.engine.RhinoScriptEngine.getFactory() and 1 other context)
Missing class javax.script.ScriptException (referenced from: javax.script.CompiledScript org.mozilla.javascript.engine.RhinoScriptEngine.compile(java.io.Reader) and 9 other contexts)
Missing class javax.script.SimpleBindings (referenced from: javax.script.Bindings org.mozilla.javascript.engine.RhinoScriptEngine.createBindings())
Missing class jdk.dynalink.CallSiteDescriptor (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.BaseFunctionLinker.getGuardedInvocation(jdk.dynalink.linker.LinkRequest, jdk.dynalink.linker.LinkerServices) and 9 other contexts)
Missing class jdk.dynalink.DynamicLinker (referenced from: jdk.dynalink.DynamicLinker org.mozilla.javascript.optimizer.Bootstrapper.linker and 2 other contexts)
Missing class jdk.dynalink.DynamicLinkerFactory (referenced from: void org.mozilla.javascript.optimizer.Bootstrapper.<clinit>())
Missing class jdk.dynalink.NamedOperation (referenced from: jdk.dynalink.Operation org.mozilla.javascript.optimizer.Bootstrapper.parseOperation(java.lang.String) and 1 other context)
Missing class jdk.dynalink.Namespace (referenced from: jdk.dynalink.Namespace org.mozilla.javascript.optimizer.ParsedOperation.namespace and 4 other contexts)
Missing class jdk.dynalink.NamespaceOperation (referenced from: jdk.dynalink.Operation org.mozilla.javascript.optimizer.Bootstrapper.parseOperation(java.lang.String) and 1 other context)
Missing class jdk.dynalink.Operation (referenced from: jdk.dynalink.Operation org.mozilla.javascript.optimizer.ParsedOperation.operation and 17 other contexts)
Missing class jdk.dynalink.RelinkableCallSite (referenced from: java.lang.invoke.CallSite org.mozilla.javascript.optimizer.Bootstrapper.bootstrap(java.lang.invoke.MethodHandles$Lookup, java.lang.String, java.lang.invoke.MethodType))
Missing class jdk.dynalink.StandardNamespace (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.DefaultLinker.getInvocation(java.lang.invoke.MethodHandles$Lookup, java.lang.invoke.MethodType, org.mozilla.javascript.optimizer.ParsedOperation))
Missing class jdk.dynalink.StandardOperation (referenced from: jdk.dynalink.Operation org.mozilla.javascript.optimizer.Bootstrapper.parseOperation(java.lang.String))
Missing class jdk.dynalink.linker.GuardedInvocation (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.BaseFunctionLinker.getGuardedInvocation(jdk.dynalink.linker.LinkRequest, jdk.dynalink.linker.LinkerServices) and 12 other contexts)
Missing class jdk.dynalink.linker.GuardingDynamicLinker (referenced from: void org.mozilla.javascript.optimizer.Bootstrapper.<clinit>() and 1 other context)
Missing class jdk.dynalink.linker.LinkRequest (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.BaseFunctionLinker.getGuardedInvocation(jdk.dynalink.linker.LinkRequest, jdk.dynalink.linker.LinkerServices) and 8 other contexts)
Missing class jdk.dynalink.linker.LinkerServices (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.BaseFunctionLinker.getGuardedInvocation(jdk.dynalink.linker.LinkRequest, jdk.dynalink.linker.LinkerServices) and 8 other contexts)
Missing class jdk.dynalink.linker.TypeBasedGuardingDynamicLinker (referenced from: void org.mozilla.javascript.optimizer.Bootstrapper.<clinit>() and 8 other contexts)
Missing class jdk.dynalink.linker.support.CompositeTypeBasedGuardingDynamicLinker (referenced from: void org.mozilla.javascript.optimizer.Bootstrapper.<clinit>())
Missing class jdk.dynalink.linker.support.Guards (referenced from: jdk.dynalink.linker.GuardedInvocation org.mozilla.javascript.optimizer.BaseFunctionLinker.getGuardedInvocation(jdk.dynalink.linker.LinkRequest, jdk.dynalink.linker.LinkerServices) and 7 other contexts)
Missing class jdk.dynalink.support.ChainedCallSite (referenced from: java.lang.invoke.CallSite org.mozilla.javascript.optimizer.Bootstrapper.bootstrap(java.lang.invoke.MethodHandles$Lookup, java.lang.String, java.lang.invoke.MethodType))

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR. You can find more info and a video demonstration on this wiki page.

Due diligence

New rules are required since Rhino and Rhino Engine 1.8.0
@TobiGr TobiGr added meta Related to the project but not strictly to code dependency Issues and PRs related to dependencies labels Mar 16, 2025
@github-actions github-actions bot added the size/small PRs with less than 50 changed lines label Mar 16, 2025
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know about the proguard rules but it makes sense to add them based on the errors. Thank you!

@Stypox Stypox merged commit b378931 into dev Mar 21, 2025
10 checks passed
@TobiGr TobiGr deleted the update-npe branch March 21, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependency Issues and PRs related to dependencies meta Related to the project but not strictly to code size/small PRs with less than 50 changed lines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants