Commit graph

2455 commits

Author SHA1 Message Date
Jean Niklas L'orange
27fe39d618 Fix ^:displace and ^:replace handling in meta-merge
An object with the metadata flag `:displace` set signals that, if a merge
conflict appears, this object is to be discarded. Likewise, `^:replace` signals
that this object should be kept in a merge conflict.

However, previous functionality only tested if the right element had the
`:replace` flag, or if the left element had the `:displace` flag. This commit
resolves this by checking whether the left element has a `:replace` flag and the
right element has a `:displace` flag, and handles accordingly to the semantics
explained in the previous paragraph.

Whenever two elements where both has the `:displace` flag is merged, the
leftmost is picked, and their metadata is merged. Likewise for the `:replace`
flag. The elements will not lose their `:displace` and `:replace` flags, as they
have not really been preferred over another element.

The `nil?` tests have been placed at the top to reflect that nil is the lack of
a value, not a value itself. As such, elements will not be "preferred" or
"discarded" over nil/nothing.
2012-12-28 04:28:34 +01:00
Michael Klishin
9bb4a5acb3 Merge pull request #894 from fbernier/patch-1
Fix deploy link in tutorial
2012-12-27 17:48:25 -08:00
François Bernier
296653e8f6 Fix deploy link in tutorial 2012-12-27 20:45:31 -05:00
Phil Hagelberg
034f94efc3 Bump default search page size up to 50. 2012-12-26 10:21:42 -08:00
Phil Hagelberg
efce0f11f3 Fix bizarre pom indentation. 2012-12-26 10:21:23 -08:00
Phil Hagelberg
98afd7ed44 Whitelist certain keys into jar/uberjar creation. Fixes #770. 2012-12-26 10:20:24 -08:00
Phil Hagelberg
f92f677eb7 Disable a test that requires Java 7. 2012-12-26 10:12:03 -08:00
Phil Hagelberg
799bf696d3 Fix classpath test. 2012-12-26 10:07:57 -08:00
Phil Hagelberg
b4cc0f9dba Rename :post-preview selector to :disabled. 2012-12-26 10:07:51 -08:00
Phil Hagelberg
c43951c9d5 Better explanation of :pom-addition, a few more env vars in sample. 2012-12-26 09:33:36 -08:00
Phil Hagelberg
335cd739db Merge pull request #889 from jaceklaskowski/patch-3
Squashing typos in the plugin section of README.md
2012-12-21 09:09:40 -08:00
Jacek Laskowski
a165c8c06e Update README.md
Squashing typos in the plugin section
2012-12-21 17:27:03 +01:00
Phil Hagelberg
1e4180148f Update lein-pkg. 2012-12-19 09:40:39 -08:00
Phil Hagelberg
d736a52588 Merge pull request #888 from hyPiRion/skip-pom-git-revision-if-empty-git-repo
Skip git revision in pom if empty git repo. Fixes #887.
2012-12-17 13:52:37 -08:00
Jean Niklas L'orange
23da9257a2 Skip git revision in pom.xml if empty git repo.
Tests if the git ref path exists before slurping the SHA from it. If it does not
exist, return nil instead of throwing an error. Also remove empty references to
the SHA where they may occur.
2012-12-17 20:20:22 +01:00
Nelson Morris
723671b607 Use aether data to figure out repository id for listener output
For "important" events, aether gives us enough info to figure
out which repo it is happening from.  Lets use it instead
of trying to match from project data.

Previously matching from the project data would be incorrect
and output failures or not output anything for transative repos.
2012-12-15 13:16:07 -06:00
Nelson Morris
c07259f875 Print checksum mismatch message
Previously the output for downloading files would just say "failed to find".
Instead output the fact checksums were invalid, and from which repository.
2012-12-15 11:13:00 -06:00
Phil Hagelberg
83d23e3a18 FAQ clarification around classpathy things and repos. 2012-12-14 14:45:30 -08:00
Phil Hagelberg
9cceba88e2 Stop using prefix lists in javac's :require. 2012-12-14 14:44:58 -08:00
Phil Hagelberg
b15a1188db Upgrade to lein-newnew 0.3.6. Fixes #865. 2012-12-14 14:42:24 -08:00
Phil Hagelberg
3a1f84f993 Merge pull request #886 from hyPiRion/run-javac-in-subprocess
Make javac run in a subprocess. Fixes #809.
2012-12-14 14:42:05 -08:00
Jean Niklas L'orange
d38ecd353b Check compiler existence within javac subprocess.
Also added ^:displace to avoid adding multiple clojure-versions onto the
classpath, and fully expanded non-`clojure.core` namespaces.
2012-12-14 14:49:53 +01:00
Jean Niklas L'orange
377a98f45e Make javac run in a subprocess. Fixes #809.
If we're not making javac run in a subprocess, libraries the project
depends on which leiningen has another version of will clash. This is
because leiningen append its standalone to java's bootclasspath, which
makes the ToolProvider add these classpaths automatically into the java
compiler it returns. By starting a subprocess without leiningen added to
the bootclasspath, we avoid this library clashing.

UI changes as a result of this patch: Whenever javac fails, the task one
wanted to run will be responsible for aborting Leiningen, whereas javac
did this itself when it discovered that the compilation failed. As we're
running in a subprocess, an abort message such as

    Uberjar aborting because jar/compilation failed: Subprocess failed

will appear, though this will only be appended to the javac error
message and the "Compilation of Java sources (lein javac) failed."
message.

This commit also adds the overhead of starting a subprocess when one
have to compile java sources, but it will not start one if no
.class-files are outdated/not existing.

Not tested on Windows.
2012-12-13 18:37:45 +01:00
Phil Hagelberg
b4558ec274 Merge pull request #883 from hyPiRion/fix-with-profile-recursive-aliases
Removes run task aliases within metadata. fix #882
2012-12-10 20:20:40 -08:00
Jean Niklas L'orange
d6ba16b9da Removes run task aliases within metadata. fix #882
Removes the task to be run residing within a project's metadata (inside
:without-profiles) in addition to the original map, in order to prevent
"with-profile" from reviving already used aliases.
2012-12-11 02:27:45 +01:00
Phil Hagelberg
2b004681f9 Merge pull request #881 from hyPiRion/alias-java-opts-to-jvm-opts
Add :java-opts as an alias for :jvm-opts
2012-12-09 20:38:10 -08:00
Jean Niklas L'orange
493adefe34 Add :java-opts as an alias for :jvm-opts 2012-12-09 19:50:34 +01:00
Anthony Grimes
5c59d28aa9 Factor out selected-namespaces code to prevent walk-off-the-screenage. 2012-12-07 17:44:31 -06:00
Anthony Grimes
ba9e56f259 Add capability for selectors to be two functions (one checks the ns, one the vars)
This makes it so that a selector such as :only can prevent unnecessary loading
of namespaces that they aren't going to work on. It is a way for a selector
that knows which namespaces it will touch by the selector's arguments and the
namespace names themselves to not have to load all namespaces.

This commit also fixes a bug introduced by a recent pull request where
'namespaces' could not be resolved. Per discussion with technomancy, provided a
default test selector *always*.
2012-12-07 17:44:31 -06:00
Michael Klishin
e5ca554ac2 Merge pull request #879 from m00sey/patch-1
Update doc/TUTORIAL.md
2012-12-07 05:58:13 -08:00
Kevin Griffin
e457fc901e Update doc/TUTORIAL.md 2012-12-07 08:55:20 -05:00
Phil Hagelberg
e1a8479319 Merge pull request #877 from balinterdi/fix-project-repositories-test-case
Fix a leiningen-core project test case
2012-12-05 10:53:23 -08:00
Phil Hagelberg
a24d54db3f Merge pull request #876 from balinterdi/update-repositories-key-in-sample-project
Update repositories key in sample project and tests
2012-12-05 10:53:10 -08:00
Balint Erdi
d0dd2dcdcf Fix a leiningen-core project test case 2012-12-04 16:44:19 +01:00
Balint Erdi
e7295dcb8a Update tests to the new way of defining replacing repositories 2012-12-04 15:58:56 +01:00
Balint Erdi
1bc325e9ae Update the sample project to the new way of replacing repositories 2012-12-04 15:56:59 +01:00
Phil Hagelberg
751b253f30 Merge pull request #873 from balinterdi/only-run-tests-which-match-selector
Only run tests which match selector
2012-12-03 20:06:01 -08:00
Phil Hagelberg
8f46783632 Merge pull request #874 from arohner/master
export $SCRIPT as leiningen.script
2012-12-03 20:02:57 -08:00
Allen Rohner
ec8b8fab34 export $SCRIPT as leiningen.script 2012-12-01 18:51:15 -08:00
Balint Erdi
c485365d61 Define selected-namespaces to make core more readable 2012-11-30 13:12:11 +01:00
Balint Erdi
8b3fb9e494 Only run test namespaces that match a test selector 2012-11-30 11:39:03 +01:00
Phil Hagelberg
b4c5fe5843 Merge pull request #872 from dgrnbrg/alternate-repo-root
Alternate repo root
2012-11-29 09:31:30 -08:00
David Greenberg
80cf398b50 Allow project's git repository to be different than project root
This allows for other directories to be used for the automatic
repository tagging. This is useful for repositories that contain
multiple projects, such as leiningen-core and leiningen, so that both
will have the correct repository tag information in their pom.xml.
2012-11-28 14:48:28 -05:00
Phil Hagelberg
f0b20c6201 Merge pull request #868 from hugoduncan/feature/add-profile
Add add-profile task, which adds profiles to the default
2012-11-26 12:00:58 -08:00
Hugo Duncan
3f08092d02 Update with-profile to accept +/- prefixes
Allow the profiles to be used to be specified as a delta from the default
profile list.
2012-11-26 14:54:08 -05:00
Michael Klishin
dff77758e0 Merge pull request #866 from uvtc/patch-1
clarify maven repository terminology. Also,
2012-11-26 09:18:49 -08:00
John Gabriele
9ec66a8b56 clarify maven repository terminology. Also,
added an oxford comma or two for good measure. :)
2012-11-26 12:17:41 -05:00
Michael Klishin
f214cf8e52 Merge pull request #864 from ghoseb/master
Minor doc & error handling enhancements.
2012-11-26 04:08:40 -08:00
Baishampayan Ghose
58e862a4bd Add documentation about the :port option when starting a headless REPL. 2012-11-26 17:12:06 +05:30
Baishampayan Ghose
d6d7733099 Handle malformed :port option gracefully. 2012-11-26 17:11:34 +05:30