-
Notifications
You must be signed in to change notification settings - Fork 637
[chiselsim] Better fix for CIRCT 1.66- and 1.66+ #3893
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
[chiselsim] Better fix for CIRCT 1.66- and 1.66+ #3893
Conversation
def maybeMoveFiles(filename: String) = try { | ||
moveFiles(filename) | ||
} catch { | ||
case _ @(_: java.nio.file.NoSuchFileException | _: java.io.FileNotFoundException) => | ||
case _: java.io.FileNotFoundException => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be a good opportunity for this to check file existence rather than catching exceptions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Switched to that. This was also starting to push things in the direction of this should be using java.nio.file.Path
instead of strings. I then rewrote the moveFiles
method to work this way while, I think, preserving the original logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of suggestions, feel free to merge when you're ready.
Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist. This commit also does some heavy cleanup of the code for moving files to only use java.nio methods as opposed to relying on doing string manipulations of paths. The logic is intended to be the exact same as before. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
722acd4
to
8f3de09
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist. This commit also does some heavy cleanup of the code for moving files to only use java.nio methods as opposed to relying on doing string manipulations of paths. The logic is intended to be the exact same as before. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 61df8bb)
Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist. This commit also does some heavy cleanup of the code for moving files to only use java.nio methods as opposed to relying on doing string manipulations of paths. The logic is intended to be the exact same as before. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 61df8bb)
Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist. This commit also does some heavy cleanup of the code for moving files to only use java.nio methods as opposed to relying on doing string manipulations of paths. The logic is intended to be the exact same as before. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 61df8bb) Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
) * [chiselsim] Better fix for CIRCT 1.66- and 1.66+ (#3893) Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist. This commit also does some heavy cleanup of the code for moving files to only use java.nio methods as opposed to relying on doing string manipulations of paths. The logic is intended to be the exact same as before. Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> (cherry picked from commit 61df8bb) * Help Scala 2.12 type inferencing with type annotations --------- Co-authored-by: Schuyler Eldridge <schuyler.eldridge@sifive.com> Co-authored-by: Jack Koenig <koenig@sifive.com>
Change the way ChiselSim moves files to track and not move files which may be duplicated in both the default black box filelist and in the main CIRCT-produced filelist. Previously, this was working because a java.nio exception was being ignored. However, this may have been hiding bugs where the filelist was actually pointing at a file that did not exist.