Skip to content
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

feat: improve resource dialect conversion accuracy #25

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

seia-soto
Copy link
Member

This PR improves redirect resource dialect conversion accuracy by redefining mapping file with multiple dialects. Since we're using AG converter, it's better to convert into AG first then remap output into uBo dialect again for better converage.

The code is written for the numbers of filters in custom filters level. We must optimize the logic to reuse on the backend which processes a lot of filters.

@seia-soto seia-soto self-assigned this Jan 27, 2025
@seia-soto seia-soto requested a review from chrmod January 27, 2025 06:57
@seia-soto seia-soto changed the title feat: improve dialect conversion accuracy feat: improve resoursce dialect conversion accuracy Jan 27, 2025
@seia-soto seia-soto changed the title feat: improve resoursce dialect conversion accuracy feat: improve resource dialect conversion accuracy Jan 27, 2025
@seia-soto
Copy link
Member Author

fixes ghostery/broken-page-reports#1103

@seia-soto seia-soto linked an issue Jan 28, 2025 that may be closed by this pull request
2 tasks
@@ -9,11 +9,11 @@ const createFilter = (rules, filterId = 0) => {

export default async function convert(rules, { resourcesPath } = {}) {
const filter = createFilter(rules.map(normalizeFilter));
const conversionResult = await converter.convertStaticRuleSet(filter, { resourcesPath });
const conversionResult = await converter.convertStaticRuleSet(filter, { resourcesPath: '/a' });
Copy link
Member

@philipp-classen philipp-classen Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the use of "/a" intended here, or should it be using the "resourcesPath" from the arguments?

Update: I assume, it is intended. Perhaps we can give some hint where it originates from (some Adguard convention?). Though I'm not sure where a comment could fit best, since "/a" is also used at other places. I wonder if extracting a constant for it could help?

@seia-soto seia-soto marked this pull request as draft January 29, 2025 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bitchute.com
2 participants