Skip to content

Fix jbang-example.java shebang line and dependency version#127

Merged
brunoborges merged 1 commit intomainfrom
fix/jbang-example-shebang-and-version
Apr 27, 2026
Merged

Fix jbang-example.java shebang line and dependency version#127
brunoborges merged 1 commit intomainfrom
fix/jbang-example-shebang-and-version

Conversation

@brunoborges
Copy link
Copy Markdown
Collaborator

Summary

Fixes jbang-example.java so it can be run with jbang.

Changes

  • Dependency version: Updated //DEPS from 0.3.0-java.2 to current 0.3.1-java.1-SNAPSHOT

Testing

Ran jbang jbang-example.java locally — Copilot connected successfully and answered a test prompt.

The first line was a bare '!' instead of the proper JBang shebang
'///usr/bin/env jbang'. Also updated the dependency version from
0.3.0-java.2 to the current 0.3.1-java.1-SNAPSHOT.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 15:34
@brunoborges brunoborges merged commit c9396fc into main Apr 27, 2026
13 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the repository’s JBang runnable example so it can be executed directly with jbang, and refreshes the example’s dependency version to match the current development version of the SDK.

Changes:

  • Fix the jbang-example.java launcher/shebang line so the file is executable by JBang.
  • Update the //DEPS version from 0.3.0-java.2 to 0.3.1-java.1-SNAPSHOT.
Show a summary per file
File Description
jbang-example.java Makes the example runnable via JBang and updates the dependency version used by the script.

Copilot's findings

  • Files reviewed: 1/1 changed files
  • Comments generated: 1

Comment thread jbang-example.java
@@ -1,5 +1,5 @@
!
//DEPS com.github:copilot-sdk-java:0.3.0-java.2
///usr/bin/env jbang "$0" "$@" ; exit $?
Copy link

Copilot AI Apr 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

//DEPS points to a -SNAPSHOT version, but the file doesn’t declare a snapshot repository (e.g., via a //REPOS directive). On a clean machine this will typically fail to resolve since Maven Central doesn’t serve snapshots. Either switch the example back to a released version, or add the appropriate snapshot repository line so jbang jbang-example.java works out of the box.

Suggested change
///usr/bin/env jbang "$0" "$@" ; exit $?
///usr/bin/env jbang "$0" "$@" ; exit $?
//REPOS https://s01.oss.sonatype.org/content/repositories/snapshots/

Copilot uses AI. Check for mistakes.
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.

3 participants