Skip to content

Add .github/copilot-instructions.md for improved Copilot assistance #1342

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

Merged
merged 3 commits into from
Jun 16, 2025

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jun 13, 2025

This PR adds a comprehensive .github/copilot-instructions.md file to help GitHub Copilot provide more contextual and accurate assistance when working with the Java.Interop repository.

What's Included

The instructions file provides detailed guidance covering:

Project Overview

  • Java.Interop as a .NET library providing JNI bindings for C# to Java interoperability
  • Key use cases including .NET for Android development and desktop Java integration

Architecture & Core Concepts

  • JNI fundamentals with type-safe bindings using JniObjectReference instead of raw IntPtr
  • Type system and marshaling between Java and .NET types
  • Code generation pipeline from XML API descriptions to C# binding code

Repository Structure

  • Core libraries (Java.Interop, Java.Runtime.Environment, etc.)
  • Code generation tools (generator, class-parse, jcw-gen)
  • Supporting libraries for Maven integration, bytecode analysis, and source processing
  • Testing framework and sample projects

Development Guidelines

  • Naming conventions (Java* vs Jni* prefixes)
  • Memory management patterns for JNI references
  • Error handling and exception marshaling
  • Threading considerations with JNI environments

Common Development Tasks

  • Binding Java libraries using the generator toolchain
  • Adding custom type marshalers
  • Working with Javadoc conversion
  • Performance optimization techniques

Build System & Testing

  • Build prerequisites and commands
  • Configuration options and local customization
  • Testing patterns for unit, integration, and performance tests

This comprehensive guide will enable Copilot to better understand the project context and provide more relevant suggestions for Java interop development tasks.

Fixes #1341.

Warning

Firewall rules blocked me from connecting to one or more addresses

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 1javsblobprodcus364.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • 7tjvsblobprodcus341.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • c78vsblobprodcus322.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • d0svsblobprodcus381.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • jd4vsblobprodcus366.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • l49vsblobprodcus358.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • uy6vsblobprodcus34.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)
  • vb4vsblobprodcus33.vsblob.vsassets.io
    • Triggering command: dotnet build -t:Prepare (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@Copilot Copilot AI changed the title [WIP] Add .github/copilot-instructions.md Add .github/copilot-instructions.md for improved Copilot assistance Jun 13, 2025
@Copilot Copilot AI requested a review from jonathanpeppers June 13, 2025 21:36
Copilot finished work on behalf of jonathanpeppers June 13, 2025 21:36
@jonathanpeppers jonathanpeppers marked this pull request as ready for review June 16, 2025 14:31
@jonathanpeppers jonathanpeppers enabled auto-merge (squash) June 16, 2025 14:33
@jonathanpeppers jonathanpeppers merged commit 48d7b94 into main Jun 16, 2025
2 checks passed
@jonathanpeppers jonathanpeppers deleted the copilot/fix-1341 branch June 16, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add .github/copilot-instructions.md
2 participants