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 context lines on failure #1312

Merged
merged 1 commit into from
Sep 26, 2024
Merged

Conversation

digama0
Copy link
Contributor

@digama0 digama0 commented Sep 25, 2024

ML error messages tend to be closer to 20 lines:

 /home/mario/Documents/HOL/src/portableML/Portable.sml:15: error: Structure does not match signature.
    Signature: val export: string * 'a -> unit
    Structure: Not present
 Found near
   struct
    structure Process = OS.Process 
    structure FileSys = OS.FileSys 
    exception Div = General.Div 
    exception Mod = ... 
    fun ... 
    ... 
    ...
    end
 error in quse /home/mario/Documents/HOL/src/portableML/Portable.sml : Fail "Static Errors"
 error in load $(HOLDIR)/sigobj/Portable : Fail "Static Errors"
 error in load $(HOLDIR)/sigobj/Feedback : Fail "Static Errors"
 error in load /home/mario/Documents/HOL/src/bool/boolScript : Fail "Static Errors"
 Uncaught exception at ./basis/FinalPolyML.sml:492: Fail "Static Errors"

Getting just the last 10 lines of this error message is dropping everything important. (For a while I didn't even realize the error message is truncated and just thought ML had really bad error messages...)

Perhaps it would be better to just have no limit? Is this a performance optimization?

@mn200
Copy link
Member

mn200 commented Sep 26, 2024

The number was chosen completely arbitrarily, knowing that if it was insufficient the user could always consult the full log (in .hollogs). You probably don't want the complete content of the log-file: if you've successfully processed hundreds of theorems before getting to the error, getting all of that output dumped seems excessive (particularly if running Holmake -k). Equally, I'm happy to try the larger number and to see how it feels in practice.

@mn200 mn200 merged commit 2b7b84f into HOL-Theorem-Prover:develop Sep 26, 2024
4 checks passed
@digama0
Copy link
Contributor Author

digama0 commented Sep 26, 2024

knowing that if it was insufficient the user could always consult the full log (in .hollogs).

Ah, that's good to know. It might be a good idea to have a message saying as much, i.e. "message truncated, see .hollogs/abcd.log for the full error report".

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