Skip to content

Conversation

@MinekPo1
Copy link

@MinekPo1 MinekPo1 commented Mar 15, 2024

  • Improved how errors are displayed, showing a traceback
  • Added a cli interface
  • dir attributes can now be relative to a user configured instance folder, instead of being absolute
  • migrated some things to pathlib.Path instead of strings

sorry for not making an issue about this first but I just was in the mood to code :P


cur_file_var = ContextVar("cur_file_var",default=None)

class Pos:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use @dataclasses.dataclass from the standard library here (https://docs.python.org/3/library/dataclasses.html)

print(e)
raise CompileError(f'Unable to compile {self.block_name} at line {self.line}')
except e:
print(traceback.format_exc())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we getting rid of printing tracebacks? Having tracebacks are invaluable for debugging.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct, sorry , I was thinking about the end user experience however , which suffers from them.

self.log(str(e) + '\a')
except CompileError as e:
self.log(str(e) + '\a')
pretty_print_error(e)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty_pint_error is not adding terminal bell character \a to end like existing system


time.sleep(1)
except KeyboardInterrupt:
print("Goodbye!")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe something like Exiting from keyboard interrupt instead?

@MinekPo1
Copy link
Author

sorry I'm not addressing the requested changes but I'm depressed and kinda in a dump rn :/

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.

3 participants