Skip to content

Failing CI on MacOS/Windows? #287

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

Closed
wants to merge 2 commits into from

Conversation

susliko
Copy link
Collaborator

@susliko susliko commented Jun 7, 2023

Haven't found a button to run the workflow manually, hence this PR
I suspect that CI is failing for MacOS and Windows

@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

Indeed, it fails
I feel like test jobs for MacOS and Windows operate on some old version of grammar. Particulary, they fail to parse structural types in extend clauses brought by #285

cc @eed3si9n @ckipp01

@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

Gotcha: the phase that generates parser out of the grammar is only run on Linux, and Windows/MacOS use the parser.c from the repo, which is stale

I think we should generate parser out of the grammar every time we run tests, regardless of the environment

@eed3si9n
Copy link
Collaborator

eed3si9n commented Jun 7, 2023

I think the bug is

- name: Parser tests
if: ${{ needs.changedfiles.outputs.c }}
shell: bash
run: npm install && npm test

If I recall correctly, at some point @keynmol, @ckipp01, and I decided that running checks on Linux is good enough, except for the external scanner C code, which we run test on all 3 OSes.

@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

If I recall correctly, at some point @keynmol, @ckipp01, and I decided that running checks on Linux is good enough, except for the external scanner C code, which we run test on all 3 OSes.

I think, running MacOS/Windows tests only when external scanner changes is okay as long as we run them using freshly generated parser

@eed3si9n
Copy link
Collaborator

eed3si9n commented Jun 7, 2023

as long as we run them using freshly generated parser

+1

@susliko susliko force-pushed the test-if-ci-fails branch from 22fea56 to 7da300e Compare June 7, 2023 20:02
@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

Could you give me a hint on the purpose of the Check parser job? 🤔

@eed3si9n
Copy link
Collaborator

eed3si9n commented Jun 7, 2023

Could you give me a hint on the purpose of the Check parser job? 🤔

To prevent someone committing a malicious C code, we test that if C sources are checked in there should be no git diff output after running generate.

@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

Is there a reason why it's disabled for Linux environment?

@eed3si9n
Copy link
Collaborator

eed3si9n commented Jun 7, 2023

Is there a reason why it's disabled for Linux environment?

When I first introduced it on 95c1437 it was Linux only, then it became non-Windows on fc77eb0, then should've been back to Linux only at 8aface5, but there was a typo on == vs !=, I think.

@susliko susliko force-pushed the test-if-ci-fails branch from 7da300e to 5a830f6 Compare June 7, 2023 21:03
Problem
-------
"Parser tests" job is run in MacOS/Windows environments whenever
external scanner changes. However it's run on the `parser.c` file from
this repo, which might be stale. This leads to falsely failing CI

Solution
-------
Remove "Parser tests" job. Instead, run "Generate parser from scratch and test it"
not only for Linux
@susliko susliko mentioned this pull request Jun 7, 2023
@susliko
Copy link
Collaborator Author

susliko commented Jun 7, 2023

When I first introduced it on 95c1437 it was Linux only, then it became non-Windows on fc77eb0, then should've been back to Linux only at 8aface5, but there was a typo on == vs !=, I think.

The check fails for this PR, not sure why

@eed3si9n
Copy link
Collaborator

eed3si9n commented Jun 8, 2023

Closing this in favor of #288

@eed3si9n eed3si9n closed this Jun 8, 2023
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.

2 participants