Skip to content

jbang info tools does not report errors #2240

@maxandersen

Description

@maxandersen

create file:

//DEPS org.h2database:h2:2.2.224
//DEPS jakarta.data:jakarta.data-api:1.0.1
//DEPS org.hibernate.orm:hibernate-core:7.0.2.Final
//DEPS org.hibernate.orm:hibernate-jpamodelgen:7.0.2.Final

jbang test.jsh says:

[jbang] Resolving dependencies...
[jbang]    org.h2database:h2:2.2.224
[jbang] [ERROR] Could not read artifact descriptor for org.h2database:h2:jar:2.2.224

but

[jbang] Resolving dependencies...
[jbang]    org.h2database:h2:2.2.224
[jbang] [WARN] Unable to obtain full information, the script probably contains errors
{
  "originalResource": "/Users/max/.jbang/cache/stdins/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42.jsh",
  "backingResource": "/Users/max/.jbang/cache/stdins/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42.jsh",
  "dependencies": [
    "org.h2database:h2:2.2.224",
    "jakarta.data:jakarta.data-api:1.0.1",
    "org.hibernate.orm:hibernate-core:7.0.2.Final",
    "org.hibernate.orm:hibernate-jpamodelgen:7.0.2.Final"
  ],
  "availableJdkPath": "/Users/max/.sdkman/candidates/java/25-graal",
  "compileOptions": [
    "-g",
    "-parameters"
  ],
  "sources": [
    {
      "originalResource": "/Users/max/.jbang/cache/stdins/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42.jsh",
      "backingResource": "/Users/max/.jbang/cache/stdins/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42/6c6b5981e85a822544a583681542ee5fbc7b492daaaed304c614fa0738b48d42.jsh"
    }
  ],
  "docs": {}

it should contain info about that error.

#2069 introduced it for files / resources but seem we missed it for dependencies

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions