Closed mattdeboard closed 5 years ago
Getting the same error since today (I also had the error before but it was fixed with #129 ), do you guys have it too ?
Are you using unstable versions of both projectile and projectile-rails ?
Updated this morning through Spacemacs, versions are :
projectile-20181003.742
projectile-rails-20180926.550
Heh it turns out that projectile removed the second argument after all https://github.com/bbatsov/projectile/commit/7b362f67a77ebfa65b896c379f8020c83f75563d
I've reverted the PR locally but now I have another issue that the -find-commands
are not working. It seems that projectile-dir-files
is now returning file paths relative to the search directory (not the root). Though it is supposed be returning the relative paths since June https://github.com/bbatsov/projectile/commit/231e898cd6e5561548dbbdfdfad6373e7c48f368 so I don't quite get why it was all working fine until today.
I need more time to provide a fix.
Thank you for looking into it !
@Kernael I've pushed a change. Once it's on MELPA let me know if it helped.
The error is gone but the result list seems to be always empty (version projectile-rails-20181003.1031
)
@Kernael I think that Melpa have yet build the latest commit:
Calling any projectile-rails-find-*
doesn't raise any error, but the matching list of items is always empty :
The error helm-M-x: The completion system you’re using does not allow inputting arbitrary value.
appears in the Messages buffer afterwards, when I close the helm window with C-g
or ESC
but I'm guessing it's not related to this issue.
@Kernael are you using the version 20181003.1130
or 20181003.1030
?
Just tried with 20181003.1130
, everything seems to work flawlessly, thanks !
@asok: FYI projectile-rails is very broken by me at the moment. Building up a testcase, in the meantime here's a stacktrace:
Debugger entered--Lisp error: (args-out-of-range "album.rb" 11 nil)
#f(compiled-function (it) #<bytecode 0x1444ab5>)("album.rb")
mapcar(#f(compiled-function (it) #<bytecode 0x1444ab5>) ("album.rb" "application_record.rb" "camera.rb" "cameras/axis.rb" "cameras/url.rb" "concerns/sluggable.rb" "concerns/workable.rb" "contact.rb" "export.rb" "exports/animation.rb" "exports/gif.rb" "exports/movie.rb" "exports/zip.rb" "filter.rb" "filters/blur.rb" "filters/crop.rb" "filters/overlay.rb" "filters/rotation.rb" "galleries_album.rb" "gallery.rb" "host.rb" "image.rb" "log.rb" "metadata.rb" "permission.rb" "role.rb" "statistic.rb" "tag.rb" "task.rb" "tasks/downloader.rb" "tasks/publisher.rb" "user.rb"))
projectile-rails-dir-files("/home/silex/work/stvs/arqivis/apps/rails/app/models/")
projectile-rails-choices((("app/models/" "\\(.+\\)\\.rb$")))
(let* ((choices (projectile-rails-choices '(("app/models/" "\\(.+\\)\\.rb$")))) (filename (or (projectile-completing-read "model: " (projectile-rails-hash-keys choices)) (user-error "The completion system you're using does not allow inputting arbitrary value."))) (filepath (gethash filename choices))) (if filepath (projectile-rails-goto-file filepath) (when "app/models/${filename}.rb" (projectile-rails-goto-file (s-lex-format "app/models/${filename}.rb") t))))
(projectile-rails-find-resource "model: " '(("app/models/" "\\(.+\\)\\.rb$")) "app/models/${filename}.rb")
projectile-rails-find-model()
funcall-interactively(projectile-rails-find-model)
@Silex there are a lot test cases failing. I'm waiting for the new release of projectile before fixing them.
@Silex there are a lot test cases failing. I'm waiting for the new release of projectile before fixing them.
Ah, then I'll just wait & see :wink:
Projectile 2.0.0 was release about a week ago. I've updated the tests to pass. Also I've noticed that finding current component and fabricator was broken.
I've made release v0.17.0 that's compatible with projectile 2.0.0.
Thanks for your effort, it is appreciated. Do you have a Patreon or Gittip?
Do you have a Patreon or Gittip?
It's very kind that you ask. I've always thought that setting up a Patreon or Gittip is a bad idea, because I won't have enough time to commit for this project. Even less when I switch to other language at my day job. And that wouldn't be fair for the people who would send tips. But this project is few years old and I'm still doing rails, so maybe I should consider it after all :)
When I run
projectile-rails-find-[anything]
I get an error:projectile-rails-dir-files: Wrong number of arguments: (2 . 2), 1
Here is the debugger info from when I run the command manually:
This started happening after I updated to latest version. Please let me know if there is any further information I can provide.
edit: Actually it looks like maybe the signature for
projectile-dir-files
has changed. It now requires two arguments.edit2: Very recent change