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

vdoc: fix handling of .vdocignore files in subdirectories #21514

Merged
merged 4 commits into from
May 16, 2024

Conversation

ttytm
Copy link
Member

@ttytm ttytm commented May 16, 2024

Fixes legitimately failing tests in e.g.: #21511, https://github.com/vlang/v/actions/runs/9111620514/job/25049117265?pr=21511

I can't tell why the tests related to this functionality only fail now. I can't reproduce a non-failing state. Moving back several commits and rebuilding with the associated older vc, the tests should have failed earlier.

@spytheman
Copy link
Member

spytheman commented May 16, 2024

It is indeed weird, and the test does pass locally (for me) on both master, and on the PR where it failed, while on the CI and for @Delta456 it failed consistently 🤔 for https://github.com/vlang/v/actions/runs/9117947709/job/25069947585?pr=21515 :

image

@spytheman spytheman merged commit 41b7e5f into vlang:master May 16, 2024
23 checks passed
@ttytm ttytm deleted the vdoc/vdocignore-in-subdirs branch May 16, 2024 19:47
@spytheman
Copy link
Member

btw, @Delta456 discovered this:

   > assert mod_list.len == submodules_no_ignore.len, mod_list.str()
     Left value: 10
    Right value: 11
        Message: ['/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/alpha', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/alpha_bravo', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/bravo_charly', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/charly', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/charly/alpha', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/charly/echo', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/charly/foxtrot/golf', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/foxtrot', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/golf', '/tmp/v_1000/tsession_7eebc99e7740_20664589119853/vod_test_module/hotel']

i.e. the charly/delta entry seems to be the missing one, to make .len == 11 as it expected

@ttytm
Copy link
Member Author

ttytm commented May 16, 2024

Right, there was a .vdocignore containing delta added to the alpha submodule to test .vdocignore files in sub-paths (when the parent already has an .vdocignore file).

On master, the .vdocignore in alpha added delta to the global ignore patterns, so charly/delta was unintentionally ignored.

@ttytm
Copy link
Member Author

ttytm commented May 16, 2024

For me, the test started to fail locally some time after I did a system update today. Maybe that's the reason. Still weird.

@spytheman
Copy link
Member

It may be dependent on the order of the returned entries by os.ls 🤔 .

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.

None yet

2 participants