Skip to content
Open
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,401 changes: 1,322 additions & 1,079 deletions Cargo.lock

Large diffs are not rendered by default.

115 changes: 56 additions & 59 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,99 +24,96 @@ result_large_err = "allow"
too_many_arguments = "allow"

[workspace.dependencies]
actix-web = "4.4.0"
actix-web = "4.13.0"
aether_factory = { git = "https://github.com/posit-dev/air", package = "air_r_factory", rev = "4cbd36d552e27d8930cff1602d56bfd9ce4c1ed1" }
aether_lsp_utils = { git = "https://github.com/posit-dev/air", rev = "4cbd36d552e27d8930cff1602d56bfd9ce4c1ed1" }
aether_parser = { git = "https://github.com/posit-dev/air", package = "air_r_parser", rev = "4cbd36d552e27d8930cff1602d56bfd9ce4c1ed1" }
aether_syntax = { git = "https://github.com/posit-dev/air", package = "air_r_syntax", rev = "4cbd36d552e27d8930cff1602d56bfd9ce4c1ed1" }
amalthea = { path = "crates/amalthea" }
anyhow = "1.0.100"
anyhow = "1.0.102"
ark = { path = "crates/ark" }
ark_test = { path = "crates/ark_test" }
assert_matches = "1.5.0"
async-trait = "0.1.66"
base64 = "0.21.0"
async-trait = "0.1.89"
base64 = "0.22.1"
biome_line_index = { git = "https://github.com/lionel-/biome", rev = "41d799cfa4cedd25625fc3f6bd7898532873f051" }
biome_rowan = { git = "https://github.com/lionel-/biome", rev = "41d799cfa4cedd25625fc3f6bd7898532873f051" }
blake3 = "1.8.2"
bus = "2.3.0"
cc = "1.1.22"
cfg-if = "1.0.0"
blake3 = "1.8.4"
bus = "2.4.1"
cc = "1.2.60"
cfg-if = "1.0.4"
chrono = "0.4.44"
crossbeam = { version = "0.8.4", features = ["crossbeam-channel"] }
crypto-common = "0.1.6"
ctor = "0.1.26"
dap = { branch = "main", git = "https://github.com/sztomi/dap-rs" }
dashmap = "5.4.0"
dirs = "4.0.0"
ego-tree = "0.6.2"
embed-resource = "2.5.0"
env_logger = "0.10.0"
dashmap = "6.1.0"
dirs = "6.0.0"
ego-tree = "0.11.0"
embed-resource = "3.0.8"
env_logger = "0.11.10"
etcetera = "0.11.0"
flate2 = "1.1.1"
futures = "0.3.30"
generic-array = "0.14.6"
flate2 = "1.1.9"
futures = "0.3.32"
harp = { path = "crates/harp" }
harp-macros = { path = "crates/harp/harp-macros" }
hex = "0.4.3"
hmac = "0.12.1"
home = "0.5.5"
http = "0.2.9"
insta = "1.39.0"
itertools = "0.10.5"
libc = "0.2.152"
libloading = "0.8.1"
hmac = "0.13.0"
home = "0.5.12"
insta = "1.47.2"
itertools = "0.14.0"
libc = "0.2.185"
libloading = "0.9.0"
libr = { path = "crates/libr" }
log = "0.4.18"
mime_guess = "2.0.4"
nix = { version = "0.26.2", features = ["signal"] }
notify = "6.0.0"
log = "0.4.29"
mime_guess = "2.0.5"
nix = { version = "0.26.4", features = ["signal"] }
notify = "8.2.0"
oak_core = { path = "crates/oak_core" }
oak_fs = { path = "crates/oak_fs" }
oak_index = { path = "crates/oak_index" }
oak_package = { path = "crates/oak_package" }
oak_r_process = { path = "crates/oak_r_process" }
oak_sources = { path = "crates/oak_sources" }
once_cell = "1.17.1"
parking_lot = "0.12.3"
paste = "1.0.14"
quote = "1.0.42"
rand = "0.8.5"
regex = "1.10.0"
once_cell = "1.21.4"
parking_lot = "0.12.5"
paste = "1.0.15"
quote = "1.0.45"
rand = "0.10"
regex = "1.12.3"
reqwest = { version = "0.13.2", default-features = false, features = ["blocking", "json", "rustls"] }
reqwest-middleware = "0.5.1"
reqwest-retry = "0.9.1"
rust-embed = "8.2.0"
rustc-hash = "2.1.1"
scraper = "0.15.0"
semver = "1.0.19"
serde = { version = "1.0.183", features = ["derive"] }
serde_json = { version = "1.0.94", features = ["preserve_order"] }
serde_repr = "0.1.17"
serde_with = "3.0.0"
sha2 = "0.10.6"
smallvec = "1.13.2"
rust-embed = "8.11.0"
rustc-hash = "2.1.2"
scraper = "0.26.0"
semver = "1.0.28"
serde = { version = "1.0.228", features = ["derive"] }
serde_json = { version = "1.0.149", features = ["preserve_order"] }
serde_repr = "0.1.20"
serde_with = "3.18.0"
sha2 = "0.11.0"
smallvec = "1.15.1"
stdext = { path = "crates/stdext" }
streaming-iterator = "0.1.9"
strum = "0.26.2"
strum_macros = "0.26.2"
syn = { version = "2.0.111", features = ["full"] }
tar = "0.4.44"
tempfile = "3.13.0"
tokio = { version = "1.26.0", features = ["full"] }
strum = "0.28.0"
strum_macros = "0.28.0"
syn = { version = "2.0.117", features = ["full"] }
tar = "0.4.45"
tempfile = "3.27.0"
tokio = { version = "1.52.1", features = ["full"] }
# For https://github.com/ebkalderon/tower-lsp/pull/428
tower-lsp = { branch = "bugfix/patches", git = "https://github.com/lionel-/tower-lsp" }
tracing = "0.1.40"
tracing-appender = "0.2.3"
tracing-error = "0.2.0"
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
tracing = "0.1.44"
tracing-appender = "0.2.5"
tracing-error = "0.2.1"
tracing-subscriber = { version = "0.3.23", features = ["env-filter"] }
tree-sitter = "0.24.7"
tree-sitter-r = { git = "https://github.com/r-lib/tree-sitter-r", rev = "95aff097aa927a66bb357f715b58cde821be8867" }
url = "2.5.7"
uuid = { version = "1.3.0", features = ["v4"] }
url = "2.5.8"
uuid = { version = "1.23.1", features = ["v4"] }
walkdir = "2"
windows-sys ="0.61.2"
winsafe = { version = "0.0.19", features = ["kernel"] }
xdg = "2.5.2"
yaml-rust = "0.4.5"
winsafe = { version = "0.0.27", features = ["kernel"] }
xdg = "3.0.0"
yaml-rust2 = "0.9"
zmq = "0.10.0"
2 changes: 0 additions & 2 deletions crates/amalthea/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ async-trait.workspace = true
cfg-if.workspace = true
chrono.workspace = true
crossbeam.workspace = true
crypto-common.workspace = true
dirs.workspace = true
futures.workspace = true
generic-array.workspace = true
hex.workspace = true
hmac.workspace = true
log.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/amalthea/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub enum Error {
JsonSerializeSpecFailed(serde_json::Error),
CreateSpecFailed(std::io::Error),
WriteSpecFailed(std::io::Error),
HmacKeyInvalid(String, crypto_common::InvalidLength),
HmacKeyInvalid(String, hmac::digest::InvalidLength),
CreateSocketFailed(String, zmq::Error),
SocketBindError(String, String, zmq::Error),
SocketConnectError(String, String, zmq::Error),
Expand Down
6 changes: 3 additions & 3 deletions crates/amalthea/src/fixtures/dummy_frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

use assert_matches::assert_matches;
use rand::Rng;
use rand::RngExt;
use serde_json::Value;

use crate::connection_file::ConnectionFile;
Expand Down Expand Up @@ -63,7 +63,7 @@ impl Default for DummyConnection {
impl DummyConnection {
pub fn new() -> Self {
// Create a random HMAC key for signing messages.
let key_bytes = rand::thread_rng().gen::<[u8; 16]>();
let key_bytes = rand::rng().random::<[u8; 16]>();
let key = hex::encode(key_bytes);

// Create a new kernel session from the key
Expand Down Expand Up @@ -142,7 +142,7 @@ impl DummyFrontend {

// Create a random socket identity for the shell and stdin sockets. Per
// the Jupyter specification, these must share a ZeroMQ identity.
let shell_id = rand::thread_rng().gen::<[u8; 16]>();
let shell_id = rand::rng().random::<[u8; 16]>();

let control_socket = Socket::new(
connection.session.clone(),
Expand Down
2 changes: 1 addition & 1 deletion crates/amalthea/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/

use hmac::Hmac;
use hmac::Mac;
use hmac::KeyInit;
use sha2::Sha256;
use uuid::Uuid;

Expand Down
3 changes: 1 addition & 2 deletions crates/amalthea/src/wire/wire_message.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
*
*/

use generic_array::GenericArray;
use hmac::Hmac;
use log::trace;
use serde::de::DeserializeOwned;
Expand Down Expand Up @@ -163,7 +162,7 @@ impl WireMessage {
hmac_validator.update(buf);
}
// Verify the signature
if let Err(err) = hmac_validator.verify(GenericArray::from_slice(&decoded)) {
if let Err(err) = hmac_validator.verify_slice(&decoded) {
return Err(Error::BadSignature(decoded, err));
}

Expand Down
3 changes: 1 addition & 2 deletions crates/ark/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ ego-tree.workspace = true
futures.workspace = true
harp.workspace = true
home.workspace = true
http.workspace = true
itertools.workspace = true
libc.workspace = true
libr.workspace = true
Expand Down Expand Up @@ -71,7 +70,7 @@ url.workspace = true
uuid.workspace = true
walkdir.workspace = true
winsafe.workspace = true
yaml-rust.workspace = true
yaml-rust2.workspace = true

[dev-dependencies]
ark_test.workspace = true
Expand Down
4 changes: 3 additions & 1 deletion crates/ark/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ fn main() {
let resource = Path::new("resources")
.join("manifest")
.join("ark-manifest.rc");
embed_resource::compile_for_everything(resource, embed_resource::NONE);
embed_resource::compile_for_everything(resource, embed_resource::NONE)
.manifest_required()
.unwrap();
Comment thread
lionel- marked this conversation as resolved.

cc::Build::new().file("src/debug.c").compile("debug");
}
2 changes: 1 addition & 1 deletion crates/ark/src/help_proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ use std::net::TcpListener;

use actix_web::get;
use actix_web::http::header::ContentType;
use actix_web::http::uri::PathAndQuery;
use actix_web::web;
use actix_web::App;
use actix_web::HttpRequest;
use actix_web::HttpResponse;
use actix_web::HttpServer;
use harp::exec::RFunction;
use harp::exec::RFunctionExt;
use http::uri::PathAndQuery;
use mime_guess::from_path;
use reqwest::Client;
use reqwest_middleware::ClientBuilder;
Expand Down
2 changes: 1 addition & 1 deletion crates/ark/src/lsp/completions/sources/unique/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use tower_lsp::lsp_types::Documentation;
use tower_lsp::lsp_types::InsertTextFormat;
use tower_lsp::lsp_types::MarkupContent;
use tower_lsp::lsp_types::MarkupKind;
use yaml_rust::YamlLoader;
use yaml_rust2::YamlLoader;

use crate::lsp::completions::completion_context::CompletionContext;
use crate::lsp::completions::completion_item::completion_item;
Expand Down
5 changes: 2 additions & 3 deletions crates/ark/src/plots/graphics_device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,7 @@ use amalthea::wire::update_display_data::TransientValue;
use amalthea::wire::update_display_data::UpdateDisplayData;
use anyhow::anyhow;
use anyhow::Context;
use base64::engine::general_purpose;
use base64::Engine;
use base64::prelude::*;
use crossbeam::channel::Select;
use crossbeam::channel::Sender;
use harp::exec::RFunction;
Expand Down Expand Up @@ -1023,7 +1022,7 @@ impl DeviceContext {
reader.read_to_end(&mut buffer)?;

// what an odd interface
let data = general_purpose::STANDARD_NO_PAD.encode(buffer);
let data = BASE64_STANDARD_NO_PAD.encode(buffer);

Ok(data)
}
Expand Down
8 changes: 1 addition & 7 deletions crates/ark/src/repos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,7 @@ fn apply_default_repos_auto() -> anyhow::Result<()> {

#[cfg(unix)]
fn find_repos_conf_xdg(prefix: String) -> Option<PathBuf> {
let xdg_dirs = match xdg::BaseDirectories::with_prefix(prefix.clone()) {
Ok(xdg_dirs) => xdg_dirs,
Err(e) => {
log::error!("Error finding {prefix:?} XDG directories: {}", e);
return None;
},
};
let xdg_dirs = xdg::BaseDirectories::with_prefix(prefix);
xdg_dirs.find_config_file("repos.conf")
}

Expand Down
6 changes: 3 additions & 3 deletions crates/ark/tests/plots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use amalthea::wire::execute_request::JupyterPositronRange;
use ark_test::comm::RECV_TIMEOUT;
use ark_test::DummyArkFrontend;
use ark_test::SourceFile;
use base64::Engine;
use base64::prelude::*;

/// Default DPI for the current OS, matching the constant in graphics_device.rs.
fn default_dpi() -> f64 {
Expand All @@ -21,9 +21,9 @@ fn default_dpi() -> f64 {
fn png_dimensions(base64_data: &str) -> (u32, u32) {
// The base64 data may contain newlines or use non-padded encoding
let cleaned: String = base64_data.chars().filter(|c| !c.is_whitespace()).collect();
let bytes = base64::engine::general_purpose::STANDARD
let bytes = BASE64_STANDARD
.decode(&cleaned)
.or_else(|_| base64::engine::general_purpose::STANDARD_NO_PAD.decode(&cleaned))
.or_else(|_| BASE64_STANDARD_NO_PAD.decode(&cleaned))
.expect("Failed to decode base64 PNG data");
// Validate PNG signature and minimum size for IHDR
let png_signature: [u8; 8] = [137, 80, 78, 71, 13, 10, 26, 10];
Expand Down
4 changes: 3 additions & 1 deletion crates/harp/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ fn main() {
let resource = Path::new("resources")
.join("manifest")
.join("harp-manifest.rc");
embed_resource::compile_for_everything(resource, embed_resource::NONE);
embed_resource::compile_for_everything(resource, embed_resource::NONE)
.manifest_required()
.unwrap();
}
2 changes: 1 addition & 1 deletion crates/harp/src/sys/unix/library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ pub fn open_r_shared_library(path: &Path) -> Result<libloading::Library, libload
// https://github.com/posit-dev/amalthea/pull/205
let flags = RTLD_LAZY | RTLD_GLOBAL;

let library = unsafe { Library::open(Some(&path), flags) };
let library = unsafe { Library::open(Some(path), flags) };

// Map from the OS specific `Library` into the cross platform `Library`

Expand Down
Loading