nurpax / c64jasm

C64 6502 assembler in TypeScript
51 stars 14 forks source link

[improvement] At assembling, show an explicit error when an !include file is not found #68

Closed shazz closed 3 years ago

shazz commented 3 years ago

Hi, Not really a bug but would help in case of. If you add !include "macros.asm" and the file is not found, instead of telling it, c64jasm will generate errors based on macros name undefined.

Would be great to just warn the file was not found :)

nurpax commented 3 years ago

I'm a little surprised this doesn't work. There's even a specific test that tests this:

https://github.com/nurpax/c64jasm/blob/master/test/errors/include1.input.asm

I'll try to repro locally.

nurpax commented 3 years ago

E.g.,

~/dev/c64jasm/test/errors$ c64jasm include1.input.asm --out /dev/null
Compiling include1.input.asm
include1.input.asm:3:1: error: Couldn't open file 'macrosxxxxinexistentfile.asm'
Compilation failed.

Curious to know what exact set of actions lead to no error being generated for your case?

shazz commented 3 years ago

I cannot reproduce it anymore.... not sure in which situation I was. Now it is clearly stated the file is missing. Sorry about that.