-
-
Notifications
You must be signed in to change notification settings - Fork 582
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
projectile-compile-project #1270
Comments
That's a duplicate of #1269. |
I am getting a similar message (using melpa's version as of today) user-error: The value for: compilation-dir in project-type: generic was neither a function nor a string. I used to be able to enter a compile command, now I just get that. I guess I have a weird project, but shouldn't the default always be to let me enter a command? Ping @andreas-marschke |
@ambihelical Is your case with this change merged? https://github.com/bbatsov/projectile/pull/1269/files If so, is the logic incorrect?
Yup. Looks like I've mucked that one up :/ |
@velimir0xff @ambihelical @nickenchev Can you check this branch and see if it fixes your problem? |
I tried the branch fix-handle-projectile-compilation-dir-generic-command in your repo, and also current bbatsov master, both have the issue. |
If I dump out the values of the locals in that function using your branch there is the following:
I don't know why the behavior changed. I tried the melpa version again, it prints compile-command in the user-error message as well. I must have copied the wrong thing in my initial message above, only way I can explain it. |
Same here, getting this after running compilation or run on last projectile from melpa
|
Works fine for me after update ( |
My version is equal to masters version, and it doesn't work. Here's my
Nothing special, just calling build script with arguments. Btw before update I've been using some really old version of projectile (projectile-20150911.844) |
Okay, I've replaced existing
It works, but only if I'm trying to compile/run from file which is in the same directory as .dir-locals (i.e. project root). If I open some file from subdirectory (i.e. src/main.cpp) and run compilation from it, it suggests empty commands. |
Managed reproduce issue on |
This workaround worked for me as well. |
This still happens for me :( |
@emil-e what project type do you have? |
@velimir0xff It seemed like I didn't have a |
installed from Melpa. Happening here today. Where is the projectile command to make a project with a top level Makefile? Is this it. |
Happens to me on |
I'm not sure from that what I should be applying. Can you clarify please.
…On Sun, 3 Mar 2019 at 09:51, Alexey Shmalko ***@***.***> wrote:
Happens to me on projectile-20190126.1117. Applying #1268
<#1268> fixes the issue.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1270 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAWJi2gSJT_MXM-gda4ZyS-AM1jTbF83ks5vS40UgaJpZM4WCm7e>
.
--
You have one vote. The same as that other guy who lost. Laugh at him.
|
I just evaluated this (defun projectile-default-generic-command (project-type command-type)
"Generic retrieval of COMMAND-TYPEs default cmd-value for PROJECT-TYPE.
If found, checks if value is symbol or string. In case of symbol
resolves to function `funcall's. Return value of function MUST
be string to be executed as command."
(let ((command (plist-get (alist-get project-type projectile-project-types) command-type)))
(cond
((stringp command) command)
((functionp command)
(if (fboundp command)
(funcall (symbol-function command))))
((and (not command) (eq command-type 'compilation-dir))
;; `compilation-dir' is special in that it is used as a fallback for the root
nil)))) |
same here today "The value for: run-commnad in project-type: make was neither a function nor a string" solved with above workaround in #1268 |
Noting this is still an issue, in my case using |
I got this in the case where the project (with the top-level Makefile) was in a subdir of the git repo, just had to |
I'm still getting this and it's incredibly frustrating... |
I'm using #1268 fix (with el-patch) since March and haven't seen any issue. (el-patch-feature projectile)
(with-eval-after-load 'projectile
(el-patch-defun projectile-default-generic-command (project-type command-type)
"Generic retrieval of COMMAND-TYPEs default cmd-value for PROJECT-TYPE.
If found, checks if value is symbol or string. In case of symbol
resolves to function `funcall's. Return value of function MUST
be string to be executed as command."
(let ((command (plist-get (alist-get project-type projectile-project-types) command-type)))
(cond
((stringp command) command)
((functionp command)
(if (fboundp command)
(funcall (symbol-function command))))
((and (not command) (eq command-type 'compilation-dir))
;; `compilation-dir' is special in that it is used as a fallback for the root
nil)
(el-patch-remove
(t
(user-error "The value for: %s in project-type: %s was neither a function nor a string." command-type project-type))))))) |
Not sure what's changed with this function, but I used to be able to set the compile command for the project's root. Now when I run it I get this:
The value for: compilation-dir in project-type: cmake was neither a function nor a string
Projectile Version: 20180815.2057
The text was updated successfully, but these errors were encountered: