Skip to content

Commit

Permalink
feat: fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
DieracDelta committed Aug 7, 2023
1 parent e35cf65 commit 7f342fb
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 14 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ will print out hello world
- Figure out how to communicate (e.g. which port, etc). It might be possible to do over stdin/stdout, but likely would need to check.
- Figure out how to get stuff out of nix.

- Add debugger flag
- initialize a NixRepl in a sensible enough way

# Thanks

Expand Down
7 changes: 5 additions & 2 deletions dawn-bindings/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,18 @@ fn main() -> miette::Result<()> {

let mut build = cc::Build::new();
build
.cpp(true)
.opt_level(2)
// .flag("-lc++abi")
.cpp(true)
.shared_flag(true)
.flag("-std=c++20")
.cpp_set_stdlib("c++")
.add_pkg_config(nix_expr)
.add_pkg_config(nix_store)
.add_pkg_config(nix_main)
.cargo_metadata(false)
.file("plugin.cpp");
.file("plugin.cpp")
;

// HACK: For some reason, rustc doesn't link libc++ on macOS by itself even
// though cc-rs has been told cpp(true). So we force it.
Expand Down
25 changes: 16 additions & 9 deletions dawn-bindings/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@ static void enable_dap(EvalState &state, const PosIdx pos, Value **args,

class PluginInstance {
Context *context;
RegisterPrimOp primop;
// RegisterPrimOp primop;

public:
// constructor
PluginInstance()
:
primop({
.name = "enable-dap",
.args = {},
.doc = "lol",
.fun = enable_dap,
.experimentalFeature = {},
})
// :
// primop({
// .name = "enable-dap",
// .args = {},
// .doc = "lol",
// .fun = enable_dap,
// .experimentalFeature = {},
// })
{
context = initialize_plugin();
}
Expand All @@ -57,5 +57,12 @@ class PluginInstance {
~PluginInstance() { deinitialize_plugin(context); }
};

// addFlag({
// .longName = "debugger",
// .description = "Start an interactive environment if evaluation fails.",
// .category = MixEvalArgs::category,
// .handler = {&startReplOnEvalErrors, true},
// });

// global variable that will be initialized when the plugin is dl-open-ed
PluginInstance x{};
4 changes: 2 additions & 2 deletions dawn-plugin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#![allow(clippy::unused_async, clippy::module_name_repetitions)]
//! nix debugger implementation
use dap_server::codec::DebugAdapterCodec;
use dap_server::debugger::{Client, DebugAdapter, State};
use dawn_infra::codec::DebugAdapterCodec;
use dawn_infra::debugger::{Client, DebugAdapter, State};
use debug_types::ProtocolMessage;
use nix_debugger::{NixDebugAdapter, NixDebugState};
use tokio_util::codec::{FramedRead, FramedWrite};
Expand Down
2 changes: 1 addition & 1 deletion dawn-plugin/src/nix_debugger.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use debug_types::{
};
use either::Either;

use dap_server::debugger::{Client, DebugAdapter, State};
use dawn_infra::debugger::{Client, DebugAdapter, State};
use debug_types::requests::RequestCommand::{
BreakpointLocations, ConfigurationDone, Disconnect, Initialize, Launch,
};
Expand Down

0 comments on commit 7f342fb

Please sign in to comment.