Closed daveseah closed 4 months ago
- TEST AUTOMATIC REBUILD OF _UR CORE
Changing and saving _ur/common/class-statemgr.constructor()
does not trigger a recompile. The VSC Terminal does not emit any messages after modifying the constructor.
- TEST AUTOHOMING INTEGRATED TERMINAL
When I split the terminal I see:
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
npm ERR! A complete log of this run can be found in: /Users/loh/.npm/_logs/2024-02-13T00_51_08_567Z-debug-0.log
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v18.18.2 --silent` to unset it.
vsenv: setting default node v18.16.0
vsenv: adding './' to end of PATH for easier CLI execution in _ur directory!
(applies only to this shell)
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/loh/.npm/_logs/2024-02-13T00_51_11_158Z-debug-0.log
nvm is not compatible with the npm config "prefix" option: currently set to ""
Run `nvm use --delete-prefix v18.16.0 --silent` to unset it.
loh@clickr _ur %
@Ben
Test 3 has now been expanded into two parts to resolve the issue that only _ur_addons
was being watched. This has been expanded to cover _ur
as well (in practice, no one should be touching _ur
source files so messed up the test). Grab the latest push to mod-ur.3.
Test 5 this might be dependent on your machine architecture, plus there was a bug in the terminal string that was preventing it from being set correctly. Try pulling the latest version of the branch.
Test 3
After running npm run dev
, I get stuck at:
Doh, I forgot about the cheesy integration test in NetCreate
for StateMgr` class; the method names have been conformed to camelCase standard. I thought no one was using StateMgr and forgot about this.
New commit pushed.
All the tests run now except for Test 5
Running nvm use --delete-prefix v18.18.2 --silent
seemed to have fixed the error temporarily. But upon closing and re-opening the terminal, cd _ur
, and then opening the split, the error happened again.
Running
nvm use --delete-prefix v18.18.2 --silent
seemed to have fixed the error temporarily.
Digging into this more, this issue is described as happening on systems with more than one version of node
, yarn
, or pnpm
installed. The PREFIX
shell variable is set to "" in the output, when it should be pointing to the nvm-managed node binary or not set at all... I believe this is a SHELL variable.
It's possible that your shell is set up in such as away that the PREFIX
is being clobbered. you'll see the "command not found: node" that is what's causing this crash...?
I've pushed a change to attempt to diagnose the issue. It will check for the existence of the nodejs binary in your path and dump diagnostic info if it's not there. This won't fix things, but it might help get to the bottom of it. Worst case, this should at least cause the shell not to emit so many weird errors (and will still work)
TROUBLESHOOTING CHECKLIST
~/.npmrc
overwriting PREFIX?With the diagnostic, this is the error/messages:
Maybe I need to redo my path?
And in case this is useful:
% which node
/Users/loh/.nvm/versions/node/v18.18.2/bin/node
Some thoughts:
Every time the integrated terminal spawns a new shell, it does execute your .zshrc
. I thought you had bash
still set as your shell so it is a little surprising.
[0]
Try opening the netcreate-itest.code-workspace
file and changing this line from:
"terminal.integrated.defaultProfile.osx": "x86 macos",
to
"terminal.integrated.defaultProfile.osx": "generic macos",
Then close the workspace and reopen it.
[1]
Perhaps there's something weird with your.zshrc
that is not working, or you have multiple package managers installed globally (yarn) or have an old sudo
or homebrew
installed node.
[2] Diagnostic WITHOUT workspace to determine default behavior of your system
pwd
to note the current working directory path. echo $0 $PATH
, then cd ..
to just change the directorypwd
and echo $0 $PATH
there as well
From this I will get an idea of what your default terminal spawning behavior is before the workspace gets involved. [3]
Another possibility is that the newer behavior in VSCODE with restoring terminals is getting in the way. I have it turned off. The VSCODE setting can be found by searching for Persistent Session Revive
; I have mine set to never
.
[4] as a point of comparison, here's what my path looks like compared to yours:
/Users/dsri/.nvm/versions/node/v18.18.2/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:./:/Users/dsri/bin/:./:/Users/dsri/bin/:./:/Users/dsri/bin/
[5] Check the version of nvm:
nvm --version
mine is 0.39.5
[6]
I'm wondering if your .zshrc
is missing the NVM alias script, but I see that your NVM_HOME
is set. This is the script that should be in your .zshrc
at the END of the file
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
The nvm.sh
script here is what's adding the correct PATH (you can see it in my PATH
output at the beginning (see [4] above), whereas it seems to be entirely missing from your screenshot).
[7]
Just to be sure, check these lines in your netcreate-itest.code-workspace
file match this:
"terminal.integrated.profiles.osx": {
"x86 macos": {
"path": "/usr/bin/arch",
"args": [
"-arch",
"x86_64",
"${env:SHELL}",
"-i",
"-c",
"export VSCODE_TERM='x86 shell';cd ${workspaceFolder}; source .vscode/vs_env; exec ${env:SHELL}"
]
},
...
"terminal.integrated.defaultProfile.osx": "x86 macos",
If the above doesn't reveal anything, I'll rollback the change until I can get a look at your actual computer to see what's different about it. I wonder if Joshua is getting the same error.
The problem was my nvm
version was outdated (0.35.3). Updating to 0.39.7 fixed the problem.
This PR adds the beginning of our testing framework as well as some other quality of life features:
_ur
build tool, making it possible to add unit testing to our addon libraries and run them all at once._ur
or_ur_addons
will now force the application to be recompiled and reload. Before, you would have to manually stop/restart.NetCreate.jsx
or other root component. Before, it was difficult to tell what was happening.cd
to the project root directory, even if you are cloning a new terminal while inside the_ur
directory. Before, it would open the current working directory and display an error.0. INITIALIZING FOR TEST
npm ci
This will install the new
vitest
package.1. TRY THE TESTING SYSTEM
cd _ur
ur test
You'll see some information about the current test. There is currently only on, located in
_ur/common/class-statemgr-test.ts
. The testing system will find anyts
file that ends with*-test.ts
or starts withtest-*.ts
.2. TEST NETCREATE and STATEMGR CLASS
cd ..
npm run dev
and open localhost:30003A. TEST AUTOMATIC REBUILD OF _UR CORE
_ur/common/class-statemgr.ts
_ur/common/class-statemgr.ts
and find theconstructor()
console.log('*** I WAS HERE')
and then save the file*** I WAS HERE
shows up.3B. TEST AUTOMATIC REBUILD OF _UR ADDONS
midi-core.ts
file_ur_addons/midi/
4. WITNESS ERROR HANDLING CHANGES
NetCreate.jsx
, insert bad syntax in the middle of the constructor function (e.g.BOO();
)5. TEST AUTOHOMING INTEGRATED TERMINAL
cd _ur
vs_env
running without errorOTHER INFORMATION
ursys-lib
bundle intoursys-core
andursys-addons
, which are loaded viaindex.ejs
source-map
library for future help to deal with sourcemaps not pointing to useful locations for debugging. This is because the URSYS core and addon libraries are transformed twice, so the original source maps are not mapped correctly in NetCreate specifically.class-op-sequencer
toursys-core
with test (unused)