ek9_remove_transitive_exclusion

Answers with the edit that deletes one excludeDeps entry from a 'defines package' block, re-allowing a previously-blocked transitive dependency.

Category: Editor · Compare: maven exclusion removal

When to use it

'Stop excluding ekopen.some.bad.pack' is one call with file:'package.ek9' and module:'ekopen.some.bad.pack'. For when the parent upgraded, or the transitive is wanted again.

When not to use it

Details

conflicts[].kind: 'exclusion-not-declared' (the description lists the existing keys) and 'dependency-is-direct-not-transitive' (use ek9_remove_dependency). error.message: 'package-block-not-found', 'excludeDeps-not-found' or 'single-line-bucket-unsupported' (only the multi-line Dict form is edited). An emptied Dict's whole declaration is removed and the summary says so. Removal affects future resolutions only - pair with ek9_resolve_dependencies.

Arguments

ArgumentTypeRequiredWhat it is
filestringyesThe .ek9 file holding the 'defines package' block, workspace-relative (typically 'package.ek9'); an absolute path inside the workspace is accepted.
modulestringyesThe previously-excluded transitive module, e.g. 'ekopen.some.bad.dependency.pack' - matched against the excludeDeps Dict key.

It also takes the arguments every tool takes.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it. 3 of the 4 recorded are shown.

Remove transitive exclusion apply

Request

{
  "file" : "package.ek9",
  "module" : "ekopen.some.bad.dependency.pack"
}

Response

{
  "conflicts" : [ ],
  "edits" : [ {
    "before" : "      \"ekopen.some.bad.dependency.pack\": \"ekopen.org.supertools.util\",",
    "endLine" : 15,
    "file" : "package.ek9",
    "startLine" : 15,
    "type" : "delete"
  } ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "risk" : {
    "crossesModuleBoundary" : false,
    "estimatedSeverity" : "trivial",
    "fileCount" : 1,
    "lineCount" : 1,
    "touchesPublicApi" : false,
    "touchesTests" : false
  },
  "status" : "applied",
  "summary" : "Removed ekopen.some.bad.dependency.pack from excludeDeps",
  "workspaceHash" : "<workspace-hash>",
  "wouldBeDiagnostics" : [ ],
...

Cut short here: 2 more lines. The whole recorded call.

Remove transitive exclusion not declared

Request

{
  "file" : "package.ek9",
  "module" : "ekopen.never.excluded.pack"
}

Response

{
  "conflicts" : [ {
    "description" : "ekopen.never.excluded.pack is not excluded in excludeDeps; existing keys: [ekopen.some.bad.dependency.pack]",
    "file" : "package.ek9",
    "kind" : "exclusion-not-declared"
  } ],
  "edits" : [ ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "risk" : {
    "crossesModuleBoundary" : false,
    "estimatedSeverity" : "trivial",
    "fileCount" : 0,
    "lineCount" : 0,
    "touchesPublicApi" : false,
    "touchesTests" : false
  },
  "status" : "conflicts",
  "summary" : "ekopen.never.excluded.pack is not excluded in excludeDeps; existing keys: [ekopen.some.bad.dependency.pack]",
  "workspaceHash" : "<workspace-hash>",
  "wouldBeDiagnostics" : [ ],
  "written" : false
}

Remove transitive exclusion direct escalation

Request

{
  "file" : "package.ek9",
  "module" : "ekopen.net.handy.tools"
}

Response

{
  "conflicts" : [ {
    "description" : "ekopen.net.handy.tools is a direct 'deps' dependency, not an exclusion; use ek9_remove_dependency to drop it",
    "file" : "package.ek9",
    "kind" : "dependency-is-direct-not-transitive"
  } ],
  "edits" : [ ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "risk" : {
    "crossesModuleBoundary" : false,
    "estimatedSeverity" : "trivial",
    "fileCount" : 0,
    "lineCount" : 0,
    "touchesPublicApi" : false,
    "touchesTests" : false
  },
  "status" : "conflicts",
  "summary" : "ekopen.net.handy.tools is a direct 'deps' dependency, not an exclusion; use ek9_remove_dependency to drop it",
  "workspaceHash" : "<workspace-hash>",
  "wouldBeDiagnostics" : [ ],
  "written" : false
}