- 
                Notifications
    
You must be signed in to change notification settings  - Fork 561
 
          [tests] run Java.Interop-Tests on NativeAOT
          #10496
        
          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
          
     Draft
      
      
            jonathanpeppers
  wants to merge
  3
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
dev/peppers/java-interop-tests-nativeaot
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
                
     Draft
            
            
          Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    In 32fcc8b, I enabled tests related to the "GC Bridge" on NativeAOT, but discovered we still weren't running dotnet/java-interop's tests. Let's enable them. We can also remove `$(DefineConstants)` for `CORECLR` and `NATIVEAOT` as there is nothing using these.
| 
           This one crashes with:  | 
    
Context: 869b0e0 The `pinvoke_unreachable` function, when invoked, would log its own source location instead of that of the call site. That's a bit useless in diagnosing issues, so let's improve it by logging the call site location... :)
| 
           I added the #10502 change to this PR, it should give us better info on which p/invoke was called.  | 
    
    
  grendello 
      added a commit
      that referenced
      this pull request
    
      Sep 19, 2025 
    
    
      
  
    
      
    
  
Context: #10496 (comment) Context: 869b0e0 The `_monodroid_weak_gref_delete` p/invoke wasn't implemented in 869b0e0 as it was thought to be unused. However, the test failure in #10496 shows that it's not true. Bring the `_monodroid_weak_gref_delete` implementation to NativeAOT host from the CoreCLR host.
Context: #10496 (comment) Context: 869b0e0 The `_monodroid_weak_gref_delete` p/invoke wasn't implemented in 869b0e0 as it was thought to be unused. However, the test failure in #10496 shows that it's not true. Bring the `_monodroid_weak_gref_delete` implementation to NativeAOT host from the CoreCLR host.
| 
           Comitted the change in #10504 to this PR, it implements   | 
    
| 
           Now we are beyond the crash, there are test failures that are probably bugs: Seems like some package name or text is missing before the   | 
    
    
  jonathanpeppers 
      pushed a commit
      that referenced
      this pull request
    
      Sep 19, 2025 
    
    
      
  
    
      
    
  
Context: #10496 (comment) Context: 869b0e0 The `_monodroid_weak_gref_delete` p/invoke wasn't implemented in 869b0e0 as it was thought to be unused. However, the test failure in #10496 shows that it's not true. Bring the `_monodroid_weak_gref_delete` implementation to NativeAOT host from the CoreCLR host.
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
In 32fcc8b, I enabled tests related to the "GC Bridge" on NativeAOT, but discovered we still weren't running dotnet/java-interop's tests. Let's enable them.
We can also remove
$(DefineConstants)forCORECLRandNATIVEAOTas there is nothing using these.