feat: release Dever 0.1.5 with direct workers and long transactions
This commit is contained in:
1 parent
89629c2197
commit
a900d7e8db
153 files changed
+3676
-3708
No files matched your search
@@ -2,8 +2,8 @@ use super::*;
|
||||
use dever_cli::libs::build::{Inputs, Session, pack};
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
||||
#[path = "../../dever-tests/tests/support/sandbox.rs"]
|
||||
pub(super) mod sandbox;
|
||||
#[path = "../../dever-tests/tests/support/process_runtime.rs"]
|
||||
pub(super) mod process_runtime;
|
||||
|
||||
#[derive(Deserialize, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
@@ -111,12 +111,12 @@ impl Inputs for AuthorInputs {
|
||||
}
|
||||
fn assets(&self) -> Result<Vec<(String, Vec<u8>)>, String> {
|
||||
let workspace = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
Ok(sandbox::assets(&workspace)
|
||||
Ok(process_runtime::assets(&workspace)
|
||||
.into_iter()
|
||||
.map(|asset| {
|
||||
let _mode = asset.executable;
|
||||
(
|
||||
asset.path.trim_start_matches("sandbox/").into(),
|
||||
asset.path.trim_start_matches("process-runtime/").into(),
|
||||
asset.bytes,
|
||||
)
|
||||
})
|
||||
@@ -195,11 +195,11 @@ pub(super) fn prepare_tool_pack(
|
||||
}
|
||||
files.sort_by(|left, right| left.0.cmp(&right.0));
|
||||
manifest.validate(&files, &descriptor).unwrap();
|
||||
let assets = sandbox::assets(&workspace)
|
||||
let assets = process_runtime::assets(&workspace)
|
||||
.into_iter()
|
||||
.map(|asset| {
|
||||
(
|
||||
asset.path.trim_start_matches("sandbox/").into(),
|
||||
asset.path.trim_start_matches("process-runtime/").into(),
|
||||
asset.bytes,
|
||||
)
|
||||
})
|
||||
|
||||
@@ -338,11 +338,11 @@ impl Inputs for AuthorInputs {
|
||||
}
|
||||
fn assets(&self) -> Result<Vec<(String, Vec<u8>)>, String> {
|
||||
let workspace = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("../..");
|
||||
Ok(build_tests::sandbox::assets(&workspace)
|
||||
Ok(build_tests::process_runtime::assets(&workspace)
|
||||
.into_iter()
|
||||
.map(|asset| {
|
||||
(
|
||||
asset.path.trim_start_matches("sandbox/").into(),
|
||||
asset.path.trim_start_matches("process-runtime/").into(),
|
||||
asset.bytes,
|
||||
)
|
||||
})
|
||||
@@ -403,7 +403,7 @@ fn resolver<'a>(
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore = "explicit official npm native source build; network only in registry resolver, never in lifecycle sandbox"]
|
||||
#[ignore = "explicit official npm native source build; network only in registry resolver, never in lifecycle process_runtime"]
|
||||
fn builds_official_npm_addon_with_locked_lifecycle() {
|
||||
let inputs = AuthorInputs::load();
|
||||
let session = Session::new(&inputs);
|
||||
@@ -596,7 +596,7 @@ fn npm_build_output_hard_links_stay_inside_the_exported_tree() {
|
||||
),
|
||||
(
|
||||
"outsidealias",
|
||||
"const fs=require('fs');fs.writeFileSync('/data/build/outside.txt','outside');fs.linkSync('/data/build/outside.txt','alias.txt');",
|
||||
"const fs=require('fs');fs.writeFileSync('../outside.txt','outside');fs.linkSync('../outside.txt','alias.txt');",
|
||||
false,
|
||||
),
|
||||
] {
|
||||
|
||||
@@ -37,7 +37,7 @@ impl Inputs for RuntimeOnly {
|
||||
panic!("archive restoration must not load build extensions")
|
||||
}
|
||||
fn assets(&self) -> Result<Vec<(String, Vec<u8>)>, String> {
|
||||
panic!("archive restoration must not execute a sandbox")
|
||||
panic!("archive restoration must not execute a process_runtime")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ fn validate_native(
|
||||
) -> Result<(), String> {
|
||||
let wheel_files = files
|
||||
.keys()
|
||||
.filter(|path| !path.starts_with("runtime/") && !path.starts_with("sandbox/"))
|
||||
.filter(|path| !path.starts_with("runtime/") && !path.starts_with("process-runtime/"))
|
||||
.cloned()
|
||||
.collect();
|
||||
dever_cli::workers::python_wheel::validate_native(
|
||||
@@ -38,11 +38,7 @@ fn wheel_console_scripts_use_the_same_private_prefix_and_record_generated_files(
|
||||
.find(|file| file.path == "runtime/bin/sample-tool")
|
||||
.unwrap();
|
||||
assert!(script.executable);
|
||||
assert!(
|
||||
script
|
||||
.bytes
|
||||
.starts_with(b"#!/worker/runtime/bin/python3 -I\n")
|
||||
);
|
||||
assert!(script.bytes.starts_with(b"#!/bin/sh\n"));
|
||||
assert!(String::from_utf8_lossy(&script.bytes).contains("sample.cli"));
|
||||
let record = installed
|
||||
.iter()
|
||||
@@ -280,11 +276,7 @@ fn wheel_installs_all_standard_schemes_and_rewrites_installed_record() {
|
||||
.find(|file| file.path == "runtime/bin/tool")
|
||||
.unwrap();
|
||||
assert!(script.executable);
|
||||
assert!(
|
||||
script
|
||||
.bytes
|
||||
.starts_with(b"#!/worker/runtime/bin/python3 -I\n")
|
||||
);
|
||||
assert!(script.bytes.starts_with(b"#!/bin/sh\n"));
|
||||
let record = files
|
||||
.iter()
|
||||
.find(|file| file.path.ends_with("/RECORD"))
|
||||
@@ -449,7 +441,10 @@ fn native_wheel_checks_target_suffix_and_closed_library_search() {
|
||||
.unwrap_err()
|
||||
.contains("packaged dependency closure")
|
||||
);
|
||||
files.insert("sandbox/lib/libsample.so.1".into(), library.as_slice());
|
||||
files.insert(
|
||||
"process-runtime/lib/libsample.so.1".into(),
|
||||
library.as_slice(),
|
||||
);
|
||||
validate_native("linux-x86_64", &suffixes, "runtime/bin/python3", &files).unwrap();
|
||||
let old = files
|
||||
.remove("site-packages/sample/_native.cpython-312-x86_64-linux-gnu.so")
|
||||
|
||||
Reference in new issue
Block a user