-
Notifications
You must be signed in to change notification settings - Fork 62
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
Unused fields in SAWScript.JavaMethodSpec.VerifyParams #1003
Milestone
Comments
Some further digging reveals that the |
You may be interested in #1005, which will make all of this code go away :) |
Nice! I suppose that means that the only task remaining after #1005 would be to remove |
RyanGlScott
added a commit
that referenced
this issue
Feb 2, 2021
This allows SAW to deal with JDK 9 or later, which packages its standard library not in a JAR file, but in a JIMAGE file. Extracting `.class` files from JIMAGE files proves to be surprisingly tricky, and I've carefully documented the intricacies of doing so in `Note [Loading classes from JIMAGE files]` in `SAWScript.JavaCodebase`. This fixes #861. Remaining tasks: * Ideally, the code in `SAWScript.JavaCodebase` would be upstreamed to `crucible-jvm`, where the all-important `Codebase` data type lives. Until that happens, I needed to introduce some ugly hacks in order to make everything typecheck. In particular, the (hopefully temporary) `SAWScript.JavaCodebase` module defines a version of `Codebase` that keeps track of JIMAGE-related paths. Other things: * I removed the dependency on the `xdg-basedir`, as it was unused. This dependency was likely added quite some time ago, and it appears that `saw-script` switched over to using XDG-related functionality from the `directory` library since then. I opted to use `directory` to find the `.cache` directory as well, so I have made that clear in the `.cabal` file. * The `biJavaCodebase :: Codebase` field of `BuiltinContext` is completely unused, which I noticed when making changes to the `Codebase` type. Let's just remove it. This fixes #1003.
#1005 made this problem go away. |
RyanGlScott
added a commit
that referenced
this issue
Feb 5, 2021
This allows SAW to deal with JDK 9 or later, which packages its standard library not in a JAR file, but in a JIMAGE file. This leverages `crucible-jvm` changes from GaloisInc/crucible#634. This fixes #861. Other things: * I removed the dependency on the `xdg-basedir`, as it was unused. This dependency was likely added quite some time ago, and it appears that `saw-script` switched over to using XDG-related functionality from the `directory` library since then. I opted to use `directory` to find the `.cache` directory as well, so I have made that clear in the `.cabal` file. * The `biJavaCodebase :: Codebase` field of `BuiltinContext` is completely unused, which I noticed when making changes to the `Codebase` type. Let's just remove it. This fixes #1003.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The
VerifyParams
data types is currently defined as:saw-script/src/SAWScript/JavaMethodSpec.hs
Lines 427 to 433 in 21565d7
Of these fields, only
vpOpts
andvpSpec
are ever used anywhere (inrunValidation
). As a proof of concept, it's possible to remove the other fields entirely:In fact,
runValidation
is the only function that usesVerifyParams
at all (as far as I can tell), so it might even be worthwhile to just remove the data type in favor of passing the arguments directly:The text was updated successfully, but these errors were encountered: