Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-10 Thread Jorn Vernee
On Tue, 8 Apr 2025 12:00:41 GMT, Danish Nawab wrote: >>> This catch block is per-method. It means that if the rest of the method >>> contained references to restricted methods, we would not see them. The >>> catch block should be moved to be just around the call to isRestricted, >>> which can

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v3]

2025-04-09 Thread duke
On Tue, 8 Apr 2025 13:51:59 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v3]

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 14:19:07 GMT, Jorn Vernee wrote: > Changes look good, thanks! > > Please note that we will have to wait 24 hours before integrating, in order > to give other reviews time to look as well. Great, thanks for your review! I will wait until tomorrow to issue the `/integrate` (a

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v3]

2025-04-08 Thread Jorn Vernee
On Tue, 8 Apr 2025 13:51:59 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v3]

2025-04-08 Thread Danish Nawab
> ## Description > > https://bugs.openjdk.org/browse/JDK-8353840 > > ### Existing behavior > Log the error message and terminate in case of missing system class > > > $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit code: $?" > > ERROR: Error while processing method: > reactor.c

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v2]

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 12:22:40 GMT, Jorn Vernee wrote: >> I see what you mean. Let me take a crack at it. > > One more thought: I think we should only print the error messages as part of > `dumpAll` and not `printNativeAccess`, so that the result of the latter can > still be piped directly to `--e

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v2]

2025-04-08 Thread Danish Nawab
> ## Description > > https://bugs.openjdk.org/browse/JDK-8353840 > > ### Existing behavior > Log the error message and terminate in case of missing system class > > > $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit code: $?" > > ERROR: Error while processing method: > reactor.c

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes [v2]

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 13:43:54 GMT, Danish Nawab wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit c

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Jorn Vernee
On Tue, 8 Apr 2025 12:20:02 GMT, Danish Nawab wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/JNativeScanTask.java >> line 79: >> >>> 77: try(ClassResolver classesToScan = >>> ClassResolver.forClassFileSources(toScan, version); >>> 78: ClassResolver systemCl

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Jorn Vernee
On Tue, 8 Apr 2025 08:18:36 GMT, Danish Nawab wrote: > ## Description > > https://bugs.openjdk.org/browse/JDK-8353840 > > ### Existing behavior > Log the error message and terminate in case of missing system class > > > $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit code: $?"

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 12:12:36 GMT, Jorn Vernee wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit co

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Jorn Vernee
On Tue, 8 Apr 2025 08:18:36 GMT, Danish Nawab wrote: > ## Description > > https://bugs.openjdk.org/browse/JDK-8353840 > > ### Existing behavior > Log the error message and terminate in case of missing system class > > > $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit code: $?"

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 11:55:58 GMT, Danish Nawab wrote: >> Also, instead of passing `err` down to this code, I think we should define >> an interface for `NativeMethodFinder` to log diagnostics instead. e.g. >> something like: >> >> >> interface Diagnostics { >> void error(MethodRef context,

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Danish Nawab
On Tue, 8 Apr 2025 11:45:49 GMT, Jorn Vernee wrote: >> src/jdk.jdeps/share/classes/com/sun/tools/jnativescan/NativeMethodFinder.java >> line 91: >> >>> 89: err.println("Error while processing >>> method: " + >>> 90: MethodRef.of

Re: RFR: 8353840: JNativeScan should not throw error for missing system classes

2025-04-08 Thread Jorn Vernee
On Tue, 8 Apr 2025 11:41:15 GMT, Jorn Vernee wrote: >> ## Description >> >> https://bugs.openjdk.org/browse/JDK-8353840 >> >> ### Existing behavior >> Log the error message and terminate in case of missing system class >> >> >> $ jnativescan --class-path reactor-core-3.7.4.jar; echo "Exit co

RFR: 8353840: jnativescan should not throw error for missing system classes

2025-04-08 Thread Danish Nawab
## Description https://bugs.openjdk.org/browse/JDK-8353840 ### Existing behavior Log the error message and terminate in case of missing system class ### New behavior Still log the error message about the missing system class, but continue the analysis ## Design choices Propagate `err` all th