Include paths should support project-root-relative resolution #102
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#102
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The
includestatement blocks paths containing.., which prevents test files in a separate directory from including source files.Current Behavior
The include processor has a hardcoded check that rejects any path containing
..before path resolution occurs.Expected Behavior
Include paths should go through the same path resolution utilities that other file operations in patch-seq use. The
..segments should be resolved normally, allowing:Use Case
This prevents organizing tests in a separate directory structure:
Currently, test files must live in
src/alongside production code, which is messy.Root Cause
The include path processing has an explicit check blocking
..(likely as a security measure), but this is inconsistent with other path utilities in patch-seq that can handle relative paths with..and~.Environment
https://github.com/navicore/patch-seq/pull/103
not fully fixed. we still get the unhelpful blocking check and error of:
"resolves outside the project directory".
It seems seqc considers tests/seq/ as the project directory and won't allow includes that resolve outside of it. this might have been a sensible restriction at one time but it is just friction now.
github.com/navicore/patch-seq@f2025ab7a9Fixed! Tests now compile and run from
tests/seq/withinclude "../../src/..."paths. Thanks for the quick turnaround.