8000 Fix the cause for flaky mode tests. by faassen · Pull Request #103 · Paligo/xee · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix the cause for flaky mode tests. #103

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2025
8000
Merged
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
8 changes: 2 additions & 6 deletions vendor/xslt-tests/filters
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,6 @@ bug-5001
bug-5101
bug-5201
bug-5302
bug-5401
bug-5501
bug-5601
bug-5701
Expand Down Expand Up @@ -3478,6 +3477,7 @@ initial-function-903
initial-function-904
initial-function-905
= initial-mode
initial-mode-001
initial-mode-002
initial-mode-003
initial-mode-004
Expand Down Expand Up @@ -4378,7 +4378,6 @@ mode-0105
mode-0106
mode-0107
mode-0108
mode-0201
mode-0301
mode-0601
mode-0801a
Expand All @@ -4404,8 +4403,6 @@ mode-1107a
mode-1107b
mode-1107c
mode-1108
mode-1202
mode-1203
mode-1204
mode-1301
mode-1401
Expand Down Expand Up @@ -4474,10 +4471,9 @@ mode-1515
mode-1516
mode-1517
mode-1604
mode-1615
mode-1606
mode-1616
mode-1617
mode-1619
mode-1701
mode-1701a
mode-1702
Expand Down
15 changes: 10 additions & 5 deletions xee-ir/src/declaration_compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ impl<'a> DeclarationCompiler<'a> {
ir::ModeValue::Named(name) => ir::ApplyTemplatesModeValue::Named(name.clone()),
ir::ModeValue::Unnamed => ir::ApplyTemplatesModeValue::Unnamed,
};
// we want the mode id to be unique and not overwritten
if self.mode_ids.contains_key(&apply_templates_mode_value) {
continue;
}
let mode_id = ModeId::new(self.mode_ids.len());
self.mode_ids.insert(apply_templates_mode_value, mode_id);
}
Expand Down Expand Up @@ -110,14 +114,15 @@ impl<'a> DeclarationCompiler<'a> {
function_id: function::InlineFunctionId,
) {
// ensure there are no duplicate modes
let mut mode_set = HashSet::new();
for mode in modes {
mode_set.insert(mode);
}
let mut mode_seen = HashSet::new();

let declaration_order = self.rule_declaration_order;
self.rule_declaration_order += 1;
for mode in mode_set {
for mode in modes {
if mode_seen.contains(mode) {
continue;
}
mode_seen.insert(mode);
self.rule_builders
.entry(mode.clone())
.or_default()
Expand Down
0