Skip to content

Commit d92a84d

Browse files
committed
chore: Update hotpath and fix CI
1 parent 3e21370 commit d92a84d

File tree

41 files changed

+101
-67
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+101
-67
lines changed

.github/workflows/hotpath-comment.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run-id: ${{ github.event.workflow_run.id }}
2727

2828
- name: Install hotpath CLI
29-
run: cargo install hotpath
29+
run: cargo install hotpath --bin hotpath-ci --features=ci
3030

3131
- name: Post PR comment - timing mode
3232
env:
@@ -36,7 +36,7 @@ jobs:
3636
HEAD_METRICS=$(cat /tmp/metrics/head_timing.json)
3737
BASE_METRICS=$(cat /tmp/metrics/base_timing.json)
3838
PR_NUMBER=$(cat /tmp/metrics/pr_number.txt)
39-
hotpath profile-pr \
39+
hotpath-ci profile-pr \
4040
--head-metrics "$HEAD_METRICS" \
4141
--base-metrics "$BASE_METRICS" \
4242
--github-token "$GH_TOKEN" \

.github/workflows/hotpath-profile.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ jobs:
1818
- uses: Swatinem/rust-cache@v2
1919

2020
- id: head_timing_metrics
21+
env:
22+
HOTPATH_JSON: true
2123
run: |
2224
# Extract timing metrics from head branch
2325
{
2426
echo 'metrics<<EOF'
25-
cargo run --features='hotpath,hotpath-ci' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
27+
cargo run --features='hotpath' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
2628
echo 'EOF'
2729
} >> "$GITHUB_OUTPUT"
2830
@@ -31,11 +33,13 @@ jobs:
3133
git checkout ${{ github.event.pull_request.base.sha }}
3234
3335
- id: base_timing_metrics
36+
env:
37+
HOTPATH_JSON: true
3438
run: |
3539
# Extract timing metrics from base branch
3640
{
3741
echo 'metrics<<EOF'
38-
cargo run --features='hotpath,hotpath-ci' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
42+
cargo run --features='hotpath' --profile hotpath --bin andromeda examples/performance.ts | grep '^{"hotpath_profiling_mode"'
3943
echo 'EOF'
4044
} >> "$GITHUB_OUTPUT"
4145

Cargo.lock

Lines changed: 47 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ dprint-plugin-json = "0.21.0"
3333
env_logger = "0.11.8"
3434
futures = "0.3.31"
3535
glob = "0.3.3"
36-
hotpath = { version = "0.5" }
36+
hotpath = { version = "0.9" }
3737
indexmap = "2.12.1"
3838
image = "0.25.9"
3939
lazy_static = "1.5.0"

cli/Cargo.toml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,8 @@ readme = "../README.md"
1010

1111
[features]
1212
default = []
13-
hotpath = ["dep:hotpath", "hotpath/hotpath","andromeda-core/hotpath", "andromeda-runtime/hotpath"]
14-
hotpath-alloc-bytes-total = ["hotpath/hotpath-alloc-bytes-total"]
15-
hotpath-alloc-count-total= ["hotpath/hotpath-alloc-count-total"]
16-
hotpath-alloc-self= ["hotpath/hotpath-alloc-self"]
17-
hotpath-off = ["hotpath/hotpath-off"]
18-
hotpath-ci = ["hotpath/hotpath-ci"]
13+
hotpath = ["hotpath/hotpath","andromeda-core/hotpath", "andromeda-runtime/hotpath"]
14+
hotpath-alloc = ["hotpath/hotpath-alloc"]
1915

2016
[lib]
2117
name = "andromeda"

cli/src/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ fn extract_type_mismatch_info(error_message: &str) -> (Option<String>, Option<St
588588

589589
/// Type check multiple files
590590
#[allow(clippy::result_large_err)]
591-
#[cfg_attr(feature = "hotpath", hotpath::measure)]
591+
#[hotpath::measure]
592592
pub fn check_files_with_config(
593593
paths: &[PathBuf],
594594
config_override: Option<AndromedaConfig>,

cli/src/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub struct EmbeddedConfig {
1818
}
1919

2020
#[allow(clippy::result_large_err)]
21-
#[cfg_attr(feature = "hotpath", hotpath::measure)]
21+
#[hotpath::measure]
2222
pub fn compile(
2323
result_name: &Path,
2424
input_file: &Path,

cli/src/format.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ pub enum FormatResult {
137137

138138
/// Formats a JavaScript, TypeScript, or JSON file using dprint.
139139
#[allow(clippy::result_large_err)]
140-
#[cfg_attr(feature = "hotpath", hotpath::measure)]
140+
#[hotpath::measure]
141141
pub fn format_file(path: &PathBuf) -> Result<FormatResult> {
142142
format_file_with_config(path, None)
143143
}

cli/src/lint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,7 @@ fn report_prefer_const_violations(
19731973

19741974
/// Lint a single JS/TS file with configuration
19751975
#[allow(clippy::result_large_err)]
1976-
#[cfg_attr(feature = "hotpath", hotpath::measure)]
1976+
#[hotpath::measure]
19771977
pub fn lint_file_with_config(
19781978
path: &PathBuf,
19791979
config_override: Option<AndromedaConfig>,

cli/src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ enum ConfigFileFormat {
210210
Yaml,
211211
}
212212

213-
#[cfg_attr(feature = "hotpath", hotpath::main(percentiles = [50, 95, 99], limit = 10))]
213+
#[hotpath::main(percentiles = [50, 95, 99], limit = 10)]
214214
fn main() {
215215
// Initialize beautiful error reporting from CLI
216216
init_error_reporting();
@@ -228,7 +228,7 @@ fn main() {
228228
}
229229

230230
#[allow(clippy::result_large_err)]
231-
#[cfg_attr(feature = "hotpath", hotpath::measure)]
231+
#[hotpath::measure]
232232
fn run_main() -> Result<()> {
233233
// Check if this is currently a single-file executable
234234
if let Ok(Some(js)) = find_section(ANDROMEDA_JS_CODE_SECTION) {

0 commit comments

Comments
 (0)