nand2tetris / web-ide

A web-based IDE for https://nand2tetris.org
https://nand2tetris.github.io/web-ide
Other
84 stars 22 forks source link

[bug]: Web IDE couldn't load '.hack' files in test scripts of projects/5/Computer.hdl #490

Open abhishekrathore opened 1 month ago

abhishekrathore commented 1 month ago

Tool

Hardware Simulator

Interface

Website (https://nand2tetris.github.io/web-ide)

Contact Details

rathore.abhishek87@gmail.com

What happened?

Facing a bug when running the "projects/5/Computer.hdl" tests. In the chrome console, it shows that 'Add.hack' or 'Max.hack' file is not loaded due to some exception.

Screenshot 2024-10-17 at 7 30 22 PM

Digging deeper in source code found that code is searching for file in '/samples/' directory NOT '/projects/5' directory. Fixed it in the Chrome local storage and then it worked.

Screenshot 2024-10-17 at 7 29 44 PM

Its only for files with ".hack" extensions. I guess the '/samples' directory key in WEB IDE is not there by default.

Additional Comments

No response

Do you want to try to fix this bug?

Code of Conduct

fwoerister commented 1 month ago

+1

I encountered the same error. Would be interesting if the hack files are loaded to the wrong directory or the ide is looking at the wrong location when loading hack files to the ROM.

lyrakisk commented 2 weeks ago

I also had the same problem. The quick fix that @abhishekrathore suggested solved it locally for me as well.

EricOrrDev commented 4 days ago

I am having same problem, for firefox instead of right clicking the key to edit the key value, you just double click the key to change project/05/Add.hack to be samples/Add.hack. Do that same for Max.hack and Rect.hack as well.