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

Rust: Include nested .rs files in codeql test run #18491

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

hvitved
Copy link
Contributor

@hvitved hvitved commented Jan 14, 2025

No description provided.

@github-actions github-actions bot added the Rust Pull requests that update Rust code label Jan 14, 2025
@hvitved hvitved marked this pull request as ready for review January 14, 2025 13:45
@Copilot Copilot bot review requested due to automatic review settings January 14, 2025 13:45

Choose a reason for hiding this comment

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

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Tip: If you use Visual Studio Code, you can request a review from Copilot before you push from the "Source Control" tab. Learn more

@hvitved hvitved requested a review from redsun82 January 14, 2025 14:05
Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

hmm, not sure this will work, as this would give mod a/b/c which is invalid rust, right? If we want this we probably need to use the path attribute in the generated lib.rs file.

@redsun82
Copy link
Contributor

hmm, not sure this will work, as this would give mod a/b/c which is invalid rust, right? If we want this we probably need to use the path attribute in the generated lib.rs file.

Ah, those files get actually silently dropped from lib.rs, which makes them lack semantics. Let me look at this.

@redsun82
Copy link
Contributor

@hvitved ok, this works, but if you want the nested files to have semantics you'll need to create intermediate module files by hand, like 5a1a28a (I cannot open a PR against your PR). Can you add that example here?

Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Please include something along the lines of 5a1a28a to exercise this 🙂

@hvitved
Copy link
Contributor Author

hvitved commented Jan 15, 2025

@hvitved ok, this works, but if you want the nested files to have semantics you'll need to create intermediate module files by hand, like 5a1a28a (I cannot open a PR against your PR). Can you add that example here?

Yes, this is exactly what I have also done locally, and what I want. I'll add your commit to this PR, thanks.

Copy link
Contributor

@redsun82 redsun82 left a comment

Choose a reason for hiding this comment

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

Thanks!

@redsun82 redsun82 merged commit f62a3ac into github:main Jan 15, 2025
13 checks passed
@hvitved hvitved deleted the rust/ql-test-recurse branch January 15, 2025 09:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants