Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4043a681db | ||
|
|
7cdf52544c | ||
|
|
fa14529aa2 | ||
|
|
4b6e9f35ef | ||
|
|
5684938b4c | ||
|
|
c830d2b949 | ||
|
|
d3c35eccd0 |
@@ -9,6 +9,7 @@ permissions:
|
||||
contents: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
actions: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
|
||||
+27
-12
@@ -1,19 +1,34 @@
|
||||
{
|
||||
"branches": ["main"],
|
||||
"branches": [
|
||||
"main"
|
||||
],
|
||||
"plugins": [
|
||||
"@semantic-release/commit-analyzer",
|
||||
"@semantic-release/release-notes-generator",
|
||||
"@semantic-release/changelog",
|
||||
["@semantic-release/exec", {
|
||||
"prepareCmd": "sed -i 's/^version = \\\"[^\\\"]*\\\"/version = \\\"${nextRelease.version}\\\"/' Cargo.toml && cargo check",
|
||||
"successCmd": "gh api -X POST repos/${GITHUB_REPOSITORY}/actions/workflows/publish.yml/dispatches -f ref=main -f 'inputs[tag]=v${nextRelease.version}'"
|
||||
}],
|
||||
["@semantic-release/git", {
|
||||
"assets": ["Cargo.toml", "Cargo.lock", "CHANGELOG.md"],
|
||||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||
}],
|
||||
["@semantic-release/github", {
|
||||
"assets": []
|
||||
}]
|
||||
[
|
||||
"@semantic-release/exec",
|
||||
{
|
||||
"prepareCmd": "sed -i 's/^version = \\\"[^\\\"]*\\\"/version = \\\"${nextRelease.version}\\\"/' Cargo.toml && cargo check",
|
||||
"successCmd": "gh api -X POST repos/asepharyana/mytheclipse/actions/workflows/publish.yml/dispatches -f ref=main -f 'inputs[tag]=v${nextRelease.version}'"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": [
|
||||
"Cargo.toml",
|
||||
"Cargo.lock",
|
||||
"CHANGELOG.md"
|
||||
],
|
||||
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/github",
|
||||
{
|
||||
"assets": []
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@@ -1,3 +1,27 @@
|
||||
# [1.0.0](https://github.com/asepharyana/mytheclipse/compare/v0.2.4...v1.0.0) (2026-08-28)
|
||||
|
||||
|
||||
* feat!: rename CorexError to MytheclipseError ([7cdf525](https://github.com/asepharyana/mytheclipse/commit/7cdf52544c611b05c6365595a8ae713672706b67))
|
||||
|
||||
|
||||
### BREAKING CHANGES
|
||||
|
||||
* CorexError is renamed to MytheclipseError.
|
||||
|
||||
## [0.2.4](https://github.com/asepharyana/corex/compare/v0.2.3...v0.2.4) (2026-08-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** add actions: write permission for workflow dispatch ([5684938](https://github.com/asepharyana/corex/commit/5684938b4cd5a133a57ee835426035a804edcb38))
|
||||
|
||||
## [0.2.3](https://github.com/asepharyana/corex/compare/v0.2.2...v0.2.3) (2026-08-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **release:** hardcode repo in successCmd gh api ([d3c35ec](https://github.com/asepharyana/corex/commit/d3c35eccd0e3e1da21bcfed50ce2ba1f82d03cc5))
|
||||
|
||||
## [0.2.2](https://github.com/asepharyana/corex/compare/v0.2.1...v0.2.2) (2026-08-28)
|
||||
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -107,7 +107,7 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "mytheclipse"
|
||||
version = "0.2.2"
|
||||
version = "1.0.0"
|
||||
dependencies = [
|
||||
"num_cpus",
|
||||
"rayon",
|
||||
|
||||
+3
-3
@@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "mytheclipse"
|
||||
version = "0.2.2"
|
||||
version = "1.0.0"
|
||||
edition = "2021"
|
||||
rust-version = "1.75"
|
||||
license = "MIT OR Apache-2.0"
|
||||
repository = "https://github.com/asepharyana/corex"
|
||||
homepage = "https://github.com/asepharyana/corex"
|
||||
repository = "https://github.com/asepharyana/mytheclipse"
|
||||
homepage = "https://github.com/asepharyana/mytheclipse"
|
||||
documentation = "https://docs.rs/mytheclipse"
|
||||
authors = ["asepharyana <superaseph@gmail.com>"]
|
||||
description = "Resource-aware abstractions for async I/O, heavy compute, and background queue management."
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ async fn main() {
|
||||
|
||||
let sum_result = mytheclipse::compute(|| (1..=1_000u64).sum::<u64>());
|
||||
|
||||
let panic_result: Result<u64, mytheclipse::CorexError> = mytheclipse::compute(|| {
|
||||
let panic_result: Result<u64, mytheclipse::MytheclipseError> = mytheclipse::compute(|| {
|
||||
panic!("intentional panic to demonstrate isolation");
|
||||
});
|
||||
|
||||
|
||||
+6
-6
@@ -3,12 +3,12 @@
|
||||
use std::panic::{catch_unwind, AssertUnwindSafe};
|
||||
|
||||
use crate::context::context;
|
||||
use crate::error::CorexError;
|
||||
use crate::error::MytheclipseError;
|
||||
|
||||
/// Runs `f` on the global compute thread pool and returns its result.
|
||||
///
|
||||
/// If `f` panics, the panic is caught and converted into
|
||||
/// [`CorexError::ComputePanic`] instead of unwinding across the pool
|
||||
/// [`MytheclipseError::ComputePanic`] instead of unwinding across the pool
|
||||
/// boundary or poisoning the pool; subsequent calls to [`compute`] continue
|
||||
/// to work normally.
|
||||
///
|
||||
@@ -23,7 +23,7 @@ use crate::error::CorexError;
|
||||
/// captured by mutable reference: if `f` panics partway through mutating a
|
||||
/// captured `&mut T`, that `T` may be left in an inconsistent state from
|
||||
/// the caller's perspective.
|
||||
pub fn compute<F, R>(f: F) -> Result<R, CorexError>
|
||||
pub fn compute<F, R>(f: F) -> Result<R, MytheclipseError>
|
||||
where
|
||||
F: FnOnce() -> R + Send,
|
||||
R: Send,
|
||||
@@ -32,7 +32,7 @@ where
|
||||
context()
|
||||
.compute_pool
|
||||
.install(move || catch_unwind(wrapped))
|
||||
.map_err(|payload| CorexError::ComputePanic(panic_payload_to_string(payload)))
|
||||
.map_err(|payload| MytheclipseError::ComputePanic(panic_payload_to_string(payload)))
|
||||
}
|
||||
|
||||
fn panic_payload_to_string(payload: Box<dyn std::any::Any + Send>) -> String {
|
||||
@@ -51,8 +51,8 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn compute_panic_is_isolated_and_pool_survives() {
|
||||
let panicked: Result<u32, CorexError> = compute(|| panic!("boom"));
|
||||
assert!(matches!(panicked, Err(CorexError::ComputePanic(_))));
|
||||
let panicked: Result<u32, MytheclipseError> = compute(|| panic!("boom"));
|
||||
assert!(matches!(panicked, Err(MytheclipseError::ComputePanic(_))));
|
||||
|
||||
let recovered = compute(|| 1 + 1);
|
||||
assert_eq!(recovered.unwrap(), 2);
|
||||
|
||||
+3
-3
@@ -7,7 +7,7 @@
|
||||
/// wildcard arm.
|
||||
#[non_exhaustive]
|
||||
#[derive(Debug)]
|
||||
pub enum CorexError {
|
||||
pub enum MytheclipseError {
|
||||
/// A closure submitted to [`crate::compute::compute`] panicked.
|
||||
///
|
||||
/// The contained string is a best-effort rendering of the panic
|
||||
@@ -15,7 +15,7 @@ pub enum CorexError {
|
||||
ComputePanic(String),
|
||||
}
|
||||
|
||||
impl std::fmt::Display for CorexError {
|
||||
impl std::fmt::Display for MytheclipseError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
Self::ComputePanic(message) => {
|
||||
@@ -25,4 +25,4 @@ impl std::fmt::Display for CorexError {
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for CorexError {}
|
||||
impl std::error::Error for MytheclipseError {}
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ pub mod bg;
|
||||
pub use context::{context, EngineContext};
|
||||
|
||||
#[cfg(feature = "compute")]
|
||||
pub use error::CorexError;
|
||||
pub use error::MytheclipseError;
|
||||
|
||||
#[cfg(feature = "io")]
|
||||
pub use io::spawn_io;
|
||||
|
||||
Reference in New Issue
Block a user