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

More helpful error messages ? #3

Closed
JettMonstersGoBoom opened this issue Aug 14, 2019 · 4 comments
Closed

More helpful error messages ? #3

JettMonstersGoBoom opened this issue Aug 14, 2019 · 4 comments
Labels

Comments

@JettMonstersGoBoom
Copy link
Contributor

Tried to build my alien rescue project for Gameboy and received this, I only get one warning
WARN: Shift by zero.
but I don't know where that is coming from as there are no line numbers or source output to show it ?

FATAL: What
Exception in thread "System-2" java.lang.AssertionError: What
at millfork.error.ConsoleLogger.fatal(ConsoleLogger.scala:88)
at millfork.output.AbstractAssembler.assemble(AbstractAssembler.scala:490)
at millfork.Main$.assembleForI80(Main.scala:293)
at millfork.Main$.main(Main.scala:83)
at millfork.Main.main(Main.scala)

@KarolS
Copy link
Owner

KarolS commented Aug 15, 2019

I agree that many error messages issued by the compiler are not useful.

One category is the parser errors, which will usually say "syntax error" and point somewhere only vaguely near the actual error. These will require a significant parser rewrite. I used a parser combinator library and I regret it now.

Then there are several kinds of fatal errors. Some of them are useful, but don't say where the error occurred. Some of them however, signify a situation that I didn't expect and contain a really confused and confusing message.

It looks like you encountered the case of the latter. For some reason, the compiler thinks that your initialized variables end before they start, and this is obviously wrong. It is a bug, I'll fix it soon.

@KarolS
Copy link
Owner

KarolS commented Aug 15, 2019

I managed to replicate the problem and fix it, the fix is already in the master branch

@JettMonstersGoBoom
Copy link
Contributor Author

Thanks I'll try and do a build tomorrow :)

@KarolS KarolS closed this as completed Sep 22, 2019
@KarolS
Copy link
Owner

KarolS commented Sep 22, 2019

The fix was released in 0.3.8.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants