Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly resolve the default debugger launch configuration #263

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading