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

Test types #231

Merged
merged 43 commits into from
Jan 24, 2025
Merged

Test types #231

merged 43 commits into from
Jan 24, 2025

Conversation

glass-ships
Copy link
Member

Adds type testing to the webview client via vue-tsc

@bmaranville
Copy link
Member

When I tried this out, it was flagging a lot of things from bumps... should we start there with fixing the types, or does it matter?

@glass-ships
Copy link
Member Author

glass-ships commented Nov 20, 2024

When I tried this out, it was flagging a lot of things from bumps... should we start there with fixing the types, or does it matter?

Probably, yeah. (This is actually what prompted the asyncSocket thing and some of the other changes in the develop branch of bumps)

Was considering adding a lot of the same linting/formatting/type testing stuff we have in refl1d into bumps, because it feels a little weird to debug bumps via refl1d, and consistency between these projects would be really nice. so it'd be ideal to do things directly in bumps. Also because something in the config here isn't quite right, it shouldn't be checking bumps or node_modules at all

@glass-ships
Copy link
Member Author

Still probably want to add type testing to Bumps and fix things there first, but.
For whatever reason, refl1d isn't loading against the lint-frontend branch of bumps.
Console log shows:
Uncaught (in promise) DOMException: String contains an invalid character

Worth investigating as we'll probably need to fix it eventually.
Unclear where the issue originates, but the bottom of the trace stack claims it starts at main.js:29.

Additionally, getting a warning:

[Vue warn]: Unhandled error during execution of component update 
  at <App panels= 
Array(15) [ {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, {…}, … ]
 name="Refl1D" >

but again, no further info about what that unhandled error might be.

@bmaranville
Copy link
Member

can you build the client with --sourcemap and see if the console indicates which Promise is failing?

@glass-ships
Copy link
Member Author

builds just fine:

$ vite build --sourcemap --emptyOutDir -m development
vite v6.0.2 building for development...
✓ 1451 modules transformed.
dist/0.1.26/index.html                                     0.61 kB │ gzip:   0.38 kB
dist/0.1.26/assets/refl1d-icon_48x48x32.HJicgF6C.png       4.07 kB
dist/0.1.26/assets/bumps-icon_256x256x32.Dz4RP7uH.png     54.62 kB
dist/0.1.26/assets/index.BcuciB-q.css                    359.00 kB │ gzip:  48.67 kB
dist/0.1.26/assets/index.BGn7BLFK.js                   2,751.94 kB │ gzip: 946.38 kB │ map: 11,359.74 kB

(!) Some chunks are larger than 500 kB after minification. Consider:
- Using dynamic import() to code-split the application
- Use build.rollupOptions.output.manualChunks to improve chunking: https://rollupjs.org/configuration-options/#output-manualchunks
- Adjust chunk size limit for this warning via build.chunkSizeWarningLimit.
✓ built in 8.40s

but running vite preview the page still doesn't load, and console doesn't print anything other than:

GET http://localhost:4173/ [HTTP/1.1 404 Not Found 1ms]
GET http://localhost:4173/favicon.ico [HTTP/1.1 404 Not Found 0ms]

@glass-ships
Copy link
Member Author

ohhhh yeah, that would do it

@bmaranville
Copy link
Member

I did some debugging in the browser console... trapped the exceptions and looked at the variables when the exception was thrown, and saw that the string was an svg definition, and small, looking like an icon, then looked for places we are using inline svg.

@glass-ships
Copy link
Member Author

nice yeah, you'll have to show me how you did the trapping bit, that would have had me stuck for days

@glass-ships
Copy link
Member Author

Types test now passes against bumps's test-types branch

@glass-ships glass-ships marked this pull request as ready for review December 13, 2024 17:18
Copy link
Member

@bmaranville bmaranville left a comment

Choose a reason for hiding this comment

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

These look good

@glass-ships glass-ships merged commit 3b8c34e into master Jan 24, 2025
13 checks passed
@glass-ships glass-ships deleted the test-types branch January 24, 2025 16:51
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