leiningen icon indicating copy to clipboard operation
leiningen copied to clipboard

Regression: checkouts directories may no longer be symlinks on mac

Open samaaron opened this issue 12 years ago • 10 comments

Typically I develop more complex projects by using the checkouts feature, and using symlinks in my checkouts directory to a specific checkout located somewhere else on the file system.

This was last working (for me) on version 2.2.0.

samaaron avatar Nov 04 '13 16:11 samaaron

Perhaps I am doing something wrong, but I tried to reproduce this without luck. Would it be possible to provide a gist as a small reproducible example?

hypirion avatar Nov 05 '13 16:11 hypirion

I can't reproduce this either.

technomancy avatar Nov 11 '13 21:11 technomancy

@samaaron could you provide a small project which reproduces said issue? Would be lovely to know your OS as well.

hypirion avatar Nov 20 '13 01:11 hypirion

Hi there, this is on OS X (Mavericks)

Here's a list of my checkouts directory. Notice that all except one (shader tone) are symlinks:

λ ls -allh checkouts
total 24
drwxr-xr-x   6 sam  staff   204B  4 Nov 16:23 .
drwxr-xr-x  34 sam  staff   1.1K 23 Nov 13:54 ..
lrwxr-xr-x   1 sam  staff    39B  4 Nov 12:10 osc-clj -> /Users/sam/Development/overtone/osc-clj
lrwxr-xr-x   1 sam  staff    40B  4 Nov 16:23 overtone -> /Users/sam/Development/overtone/overtone
lrwxr-xr-x   1 sam  staff    35B  4 Nov 12:10 polynome -> /Users/sam/Development/clj/polynome
drwxr-xr-x  11 sam  staff   374B  4 Nov 12:10 shadertone

When I start up a REPL, Leiningen gives me the following warnings:

WARN ignoring checkouts directory osc-clj as it does not contain a project.clj file.
WARN ignoring checkouts directory overtone as it does not contain a project.clj file.
WARN ignoring checkouts directory polynome as it does not contain a project.clj file.
WARN ignoring checkouts directory osc-clj as it does not contain a project.clj file.
WARN ignoring checkouts directory overtone as it does not contain a project.clj file.
WARN ignoring checkouts directory polynome as it does not contain a project.clj file.

Notice how shadertone isn't included in this list of warnings. It's also interesting that it's duplicated twice.

Just to demonstrate that I'm not going nuts:

λ ls -allh checkouts/osc-clj/*.clj
-rw-r--r--  1 sam  staff   272B 17 Jan  2013 checkouts/osc-clj/project.clj

There really is a project.clj file in the osc-clj checkout.

samaaron avatar Nov 23 '13 14:11 samaaron

Interestingly the checkouts directories are honoured despite the warnings. I had previously seen the warnings and trusted them ;-)

samaaron avatar Nov 23 '13 14:11 samaaron

Still unable to reproduce this one, with the current steps (a bit lengthy, but at least it is repeatable):

mkdir -p test-dir
cd test-dir
git clone https://github.com/hyPiRion/primes.git primes
cd primes
git checkout 0.2.1
lein javac
cd ..
lein new app foo
cd foo
mkdir checkouts
ln -s `pwd`/../primes checkouts/primes
echo '(ns foo.core 
  (:require [com.hypirion.primes :as p])
  (:gen-class))

(defn -main [& _]
  (prn (seq (p/take-below 100))))' > src/foo/core.clj
lein run
## prints (2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97)

Could anyone on OS X attempt to do this with Lein 2.3.4 and check that this works as intended? If not, could you also include output from lein version?

(Additionally, I pushed a fix so that the checkout warning is only printed once.)

hypirion avatar Feb 25 '14 21:02 hypirion

Going to go ahead and close this; if it's still an issue we can re-open.

technomancy avatar Apr 22 '14 20:04 technomancy

I still get the warnings as described above. However, the warnings are incorrect as the directories are not ignored, so things are still operational. I just worry about others seeing similar warnings and not knowing what to do.

samaaron avatar Apr 22 '14 23:04 samaaron

OK, thanks for the confirmation. Does this happen on every project, or just the one you've described above?

technomancy avatar Apr 23 '14 00:04 technomancy

It sounds like this bug might be specific to mac filesystems?

technomancy avatar Apr 07 '22 00:04 technomancy