Repository navigation
refactor: delete shallow and unused generator modules - #1959
Merged
Merged
Conversation
🟢 Tier S · Ready to merge
Removes unused generator default-value APIs, Twig filters, and Bower/social-sharing configuration, along with their documentation. Web generation no longer emits a Service base module: location methods use Client.flatten() and Push stores its client directly, while React Native retains its separate implementation. Adds generation checks for the resulting JavaScript SDK structure.
📂 Walkthrough · 9
Reviewed |
huangyingting
pushed a commit
to repomesh/appwrite
that referenced
this pull request
Oct 3, 2026
sdk-generator 5.3.4 (appwrite/sdk-generator#1959) deleted the share and Bower settings: no template read them. The SDKs task still set them, so generation fails with 'Call to undefined method' on 5.3.4. Removing the calls works on every 5.x generator.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implement the five deletion-test candidates in one change (net removal: 733 lines):
getParamDefault()language interface, all 13 implementations, its Twig filter, and the now-unused schema-default helper.caseArray,emptyResponse,securityNames, andparamsQueryTwig filters. KeepcaseSlash, which is used in Kotlin/Android destination paths.Servicemodule and its file registration. Location methods reuseClient.flatten(); Push owns its client directly. React Native retains its separate base module and upload behaviour.SDK::methodName()and call the language interface directly.Compatibility
This deliberately removes public generator methods (
getParamDefault(),setBowerPackage(), and the foursetShare*()methods), protected helpers, and unused Twig filters. No repository callers remain, but external generator consumers/custom templates using them will need updating. Web no longer emitssrc/service.ts; deep imports of that internal file or reliance on Push's former inheritance also need updating. React Native is unchanged.Verification
Passed:
php -d memory_limit=512M example.php: regenerated all supported example targets. The default 128 MB limit was insufficient for the combined generation, so the complete run used 512 MB.php example.php web client,php example.php node server,php example.php react-native client; inspected generated ownership/flattening and base-module output.vendor/bin/phpunit --testsuite Generation: 92 tests, 1,195 assertions, 4 skips.composer lint,composer refactor:check,composer lint-twig(636 templates, zero errors).npm ci,npm run format:check,npm run lint,npm run analyse,npm run build.npm ci, formatting/lint/type checks,npm run build,npm run test -- --runInBand: 36 suites, 897 tests passed. Tests require building the distribution first.npm ci --omit=peer, formatting/lint/type checks.go mod tidyto install generated dependencies, thengo build ./...,go vet ./...,go test ./....test -z "$(gofmt -l examples/go examples/cli)".Client.flatten()preserves array query encoding, andAvatars.getInitials()generates the expected name/width/project query parameters.git diff --check.Blocked:
vendor/bin/phpunit tests/e2e/WebNodeTest.php: mock-server startup failed because the local Docker daemon is not running. Docker-backed HTTP/browser/MQTT e2e verification has not passed.These are generator/SDK checks without meaningful application UI evidence; no screenshots are applicable. Generated output is gitignored and is not committed.