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

Custom .projectile in sub-dir does not work #1909

Open
arichiardi opened this issue Oct 4, 2024 · 0 comments
Open

Custom .projectile in sub-dir does not work #1909

arichiardi opened this issue Oct 4, 2024 · 0 comments

Comments

@arichiardi
Copy link
Contributor

arichiardi commented Oct 4, 2024

Expected behavior

I have the following custom project type.

(projectile-register-project-type
 'custom (lambda (project-root) (and project-root (string-match "my-subproject/src/foo" project-root)))
 :project-file ".projectile"
 :test-suffix "_test"

The .projectile file lives in the foo subdir of src. I'd like to have custom has detected project type (and use the _test suffix).

Actual behavior

The project type is generic

Steps to reproduce the problem

Create a git repo with src/foo/.projectile in it. Register the above project.

Environment & Version information

Projectile version information

Projectile version: 2.8.0

I did a bit of debugging and it seems the following happens:

(if (functionp marker) ;; *correctly evaluates to true*
    ;; the below call with dir=nil returns falsey though
     (and (funcall marker dir) project-type)
            (and (projectile-verify-files marker dir) project-type))

Should my marker function return true if the input dir is nil?

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

No branches or pull requests

1 participant