feat: unify source and skills for Dever 0.1.2 installation

This commit is contained in:
Antigravity committed 2026-10-05 02:49:17 +00:00
1 parent a2e0436ed4
commit 19f122b4b4
47 files changed
+1951 -63

No files matched your search

+6 -6
View File
@@ -231,6 +231,12 @@ fn execute() -> Result<ExitCode, String> {
return api::write(&program, output.as_deref());
}
api::check_baseline(&program, &root)?;
if matches!(action, Action::Check) || action.compiles_application() {
let errors = program.application_errors()?;
if !errors.is_empty() {
return Err(errors.iter().map(|error| error.render(&sources)).collect());
}
}
if matches!(action, Action::Check) {
return Ok(ExitCode::SUCCESS);
}
@@ -246,12 +252,6 @@ fn execute() -> Result<ExitCode, String> {
} else {
None
};
if action.compiles_application() {
let errors = program.application_errors()?;
if !errors.is_empty() {
return Err(errors.iter().map(|error| error.render(&sources)).collect());
}
}
match &action {
Action::Check => unreachable!("check returned before target selection"),
Action::Lib { .. } => unreachable!("lib returned before source checking"),
@@ -18,7 +18,7 @@ use super::release::{
};
use super::validate_catalog;
const OFFICIAL_RELEASES: &str = "https://github.com/shemic/dever-main/releases";
const OFFICIAL_RELEASES: &str = "https://git.dever.cc/shemic/dever/dist";
const DOWNLOAD_TIMEOUT: Duration = Duration::from_secs(300);
const METADATA_LIMIT: u64 = 2 * 1024 * 1024;
static NEXT_DOWNLOAD: AtomicU64 = AtomicU64::new(0);
@@ -47,13 +47,8 @@ impl ReleaseSource {
}
fn asset(&self, requested: &str, suffix: &str) -> String {
let selection = if requested == "latest" {
"latest/download".to_owned()
} else {
format!("download/v{requested}")
};
format!(
"{}/{selection}/dever-{}.{suffix}",
"{}/{requested}/dever-{}.{suffix}",
self.base,
platform_identity()
)
@@ -152,14 +147,7 @@ fn redirect(current: &str, location: &str) -> Result<String, String> {
|| next.password().is_some()
|| next.port_or_known_default() != Some(443)
|| next.fragment().is_some()
|| !matches!(
next.host_str(),
Some(
"github.com"
| "release-assets.githubusercontent.com"
| "objects.githubusercontent.com"
)
)
|| next.host_str() != Some("git.dever.cc")
{
return Err("release redirect must remain on the official HTTPS asset hosts".into());
}
+1 -1
View File
@@ -6,7 +6,7 @@ use crate::specialize::{self, Specialization};
use crate::types::{Field, Parameter, Shape, Type};
impl Program {
/// Application entries are known only for run/build; library checks retain unused exports.
/// CLI check/run/build share production roots; core library checks retain unused exports.
pub fn application_errors(&self) -> Result<Vec<Diagnostic>, String> {
let roots = self
.api_routes