Skip to content

chore: allow ../assets/example.glb in issue reproducers - #4437

Merged
mfazekas merged 1 commit into
mainfrom
chore/example-glb-asset
Nov 5, 2026
Merged

mfazekas merged 1 commit into
mainfrom
chore/example-glb-asset

Conversation

@mfazekas

@mfazekas mfazekas commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Description

Needed for #4433: the issue bot only lets reproducers use ../assets/example.png, so bugs that need a require()d 3D model can't pass the lint. This adds a 2.7 KB cube, example/src/assets/example.glb, and allows ../assets/example.glb in the issue lint and the docs that state the rule (bug report template, REPRODUCING.md, lint README).

While testing I also fixed three things in the lint. no-restricted-imports rejected even the allowed assets, because gitignore-style negation can't re-include a file whose parent dir is excluded. TypeScript examples flagged every require() as no-undef, so they now use the same rules as JS. And LINT_FILE runs no longer call the GitHub API.

The cube was generated with a short script, passes gltf-validator (0 errors, 0 warnings), and renders as both LocationPuck and ModelLayer on an Android Debug build. On a main Release build, the #4433 reproducer rewritten to require('../assets/example.glb') logs Unknown model file type: src_assets_example and draws no model.

Local lint runs (LINT_FILE, JS and TS):

  1. The current [Bug]: require()'d 3D models (.glb) fail to load on Android Release builds #4433 body (require('./assets/sportcar.glb')) fails.
  2. The same reproducer with require('../assets/example.glb') passes here and fails on main.
  3. ../assets/other.glb, ../assets/other.png, ./foo, ../assets/sub/example.png and ../../src/assets/example.png still fail, for both require and import.
  4. import of ../assets/example.png / ../assets/example.glb now passes.

Checklist

  • I've read CONTRIBUTING.md
  • I updated the doc/other generated code with running yarn generate in the root folder
  • I have tested the new feature on /example app.
    • In V11 mode/ios
    • In New Architecture mode/ios
    • In V11 mode/android
    • In New Architecture mode/android
  • I added/updated a sample - if a new feature was implemented (/example)

Add a small cube model to the example assets and allow it in the issue
code example lint, so 3D-model bugs can be reproduced with require().
Also make the import allowlist actually re-include the sanctioned assets,
allow require() in TypeScript examples, and let LINT_FILE runs skip the
GitHub label lookup.
@mfazekas
mfazekas merged commit efc1b8e into main Nov 5, 2026
10 checks passed
@mfazekas
mfazekas deleted the chore/example-glb-asset branch November 5, 2026 07:25

This branch was previously deployed

1 inactive deployment
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.

1 participant