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

Fail with an error message when lisp import processing fails in CLI mode #347

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

lukash
Copy link
Contributor

@lukash lukash commented Jan 16, 2024

Returns a non-zero exit code and prints an error message.

Example output:

"Append Imports" : "Line: 2: Imported file not found: </path/to/import>. If you are importing from a package in the git repository you might need to update the package archive. That can be done from the the VESC Packages page."
Errors when processing lisp imports.

The printed message is quite confusing. I think it refers to the old way the packages were built in vesc_pkg, where there were binaries committed in git and some parts were being pulled out of them. That mechanism was also very confusing to me and I would venture to say the concept is just bad (I can elaborate if needed). Unless that mechanism has a good use case, maybe the functionality could be removed altogether and the above error message simplified. Just a suggestion...

Returns a non-zero exit code and prints an error message.
Move opening the package output file right before writing. Opening the
file already creates a zero-size file on the disk, presumably when the
file is closed in the destructor.
@vedderb
Copy link
Owner

vedderb commented Jan 16, 2024

The code in the PR looks correct, but I'm not sure how the comment relates to this PR. Regarding imports, it is still possible and even quite common to import files from packages in the vesc_pkg repository. They are not downloaded from git, but from the local copy of the archive that includes the binaries. All libraries heavily rely on being able to import files from packages.

There are many ways to support importing files that are not present in a path locally. After a lot of thinking this was the best way I could come up with that is easy to implement and does not require installing anything besides VESC Tool. I want users to be able to use libraries from any platform out of the box without installing external tools such as git, so there must be a way for VESC Tool to download and cache them in a simple way. Being able to access the cached file out in the field without internet is also a requirement. For that this approach works perfectly. I'm happy to take constructive feedback, but I'm not prepared to go into any long discussion on why you think it is "just bad" and spend weeks rewriting it.

@vedderb vedderb merged commit 23c1b77 into vedderb:master Jan 17, 2024
1 check passed
@github-actions github-actions bot locked and limited conversation to collaborators Jan 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants