Skip to content

Commit

Permalink
Merge pull request #263 from nberth/implicit-build
Browse files Browse the repository at this point in the history
Properly resolve the default debugger launch configuration
  • Loading branch information
nberth authored Apr 8, 2024
2 parents dbb2419 + 5d4c905 commit d159bbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion import/superbol-vscode-debug
28 changes: 16 additions & 12 deletions src/vscode/superbol-vscode-platform/superbol_tasks.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,28 +121,32 @@ let cobc_execution ?config attributes =
~command:(`String cobc)
~args:(List.map (fun elt -> `String elt) args))

let make_default_cobc_task =
Task.make
~source:"SuperBOL"
~scope:Workspace
~problemMatchers:[
"$gnucobol";
"$gnucobol-warning";
"$gnucobol-error";
"$gnucobol-note";
]
let make_default_cobc_task ~name ~definition ~execution =
let task =
Task.make ~name ~definition ~execution ()
~source:"SuperBOL"
~scope:Workspace
~problemMatchers:[
"$gnucobol";
"$gnucobol-warning";
"$gnucobol-error";
"$gnucobol-note";
]
in
Task.set_group task TaskGroup.build;
task

let cobc_build_task ~task ?config attributes =
Promise.Option.return @@
make_default_cobc_task ()
make_default_cobc_task
~name:(Task.name task)
~definition:(Task.definition task)
~execution:(cobc_execution ?config attributes)

let define_cobc_build_task ?config ~debug name =
let map_attributes = List.map (fun (a, C (_, f, d)) -> a, f d) in
let attributes = map_attributes @@ attributes_spec ~debug in
make_default_cobc_task ()
make_default_cobc_task
~name
~definition:(TaskDefinition.create () ~type_ ~attributes)
~execution:(cobc_execution ?config attributes)
Expand Down

0 comments on commit d159bbb

Please sign in to comment.