Skip to content
This repository was archived by the owner on May 29, 2018. It is now read-only.
This repository was archived by the owner on May 29, 2018. It is now read-only.

Srcfile Globs field fails #240

@beyang

Description

@beyang

Attempting to use the Globs field in the Srcfile specification (in lieu of the Files field) fails for both srclib-go and srclib-java. The files aren't selected by the glob and there is also an assumption that the Files field is non-empty, leading to a nil-pointer/array-out-of-bounds error for both srclib-go and srclib-java.

Repro-able with this Srcfile:

{
"SourceUnits": [{
 "Name": "com.sourcegraph\/srclib-java",
 "Type": "JavaArtifact",
 "Files": [],
 "Globs": ["**/*.java"],
 "Dependencies": [
  {
   "artifactID": "aether-api",
   "file": ".gradle-srclib\/caches\/modules-2\/files-2.1\/org.eclipse.aether\/aether-api\/0.9.0.M4\/55124b465ca433e9a954b8501eb332a75f132a3e\/aether-api-0.9.0.M4.jar",
   "groupID": "org.eclipse.aether",
   "scope": "compile",
   "version": "0.9.0.M4"
  },
  {
   "artifactID": "aether-api",
   "file": ".gradle-srclib\/caches\/modules-2\/files-2.1\/org.eclipse.aether\/aether-api\/0.9.0.M4\/55124b465ca433e9a954b8501eb332a75f132a3e\/aether-api-0.9.0.M4.jar",
   "groupID": "org.eclipse.aether",
   "scope": "testCompile",
   "version": "0.9.0.M4"
  },
  {
   "artifactID": "slf4j-api",
   "file": ".gradle-srclib\/caches\/modules-2\/files-2.1\/org.slf4j\/slf4j-api\/1.7.12\/8e20852d05222dc286bf1c71d78d0531e177c317\/slf4j-api-1.7.12.jar",
   "groupID": "org.slf4j",
   "scope": "compile",
   "version": "1.7.12"
  },
  {
   "artifactID": "slf4j-api",
   "file": ".gradle-srclib\/caches\/modules-2\/files-2.1\/org.slf4j\/slf4j-api\/1.7.12\/8e20852d05222dc286bf1c71d78d0531e177c317\/slf4j-api-1.7.12.jar",
   "groupID": "org.slf4j",
   "scope": "testCompile",
   "version": "1.7.12"
  }
 ],
 "Data": {
  "ClassPath": [
   ".gradle-srclib\/caches\/modules-2\/files-2.1\/com.beust\/jcommander\/1.30\/c440b30a944ba199751551aee393f8aa03b3c327\/jcommander-1.30.jar",
   ".gradle-srclib\/caches\/modules-2\/files-2.1\/org.apache.maven\/maven-settings-builder\/3.2.3\/affc67a5b0b9c3cfc149898a15fe6c373f499882\/maven-settings-builder-3.2.3.jar"
  ],
  "Description": "",
  "GradleFile": "build.gradle",
  "SourcePath": [
   [
    "com.sourcegraph\/srclib-java",
    "0.0.1-SNAPSHOT",
    "src\/main\/java"
   ],
   [
    "com.sourcegraph\/srclib-java",
    "0.0.1-SNAPSHOT",
    "src\/test\/java"
   ]
  ],
  "SourceVersion": "1.8"
 }
}]
}

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions