Ordinarily I'd also check that the filename was not "-", or perhaps
get the absolute path, but in this case I know the filename. (Otherwise
this could result in a hung process as gpg waited for stdin.)
The dependencies for pomegranate were cleaned up as of pomegranate-0.0.8. We no longer need to exclude slf4j. (Hard to claim this is important; I just happened to notice that it was not needed.)
Fixes#978.
By adding an atom (to pop off used aliases to avoid recursive calls)
which contains :user :aliases from profiles, we can use those aliases
outside of project maps. Whenever looking up aliases, will check the
atom if we're not in a project.
Add support for profiles.d within the user's Leiningen home directory. All .clj
files within LEIN_HOME/profiles.d will be treated as maps merged into the
original profiles.clj (if existing).
Erroneous .clj file inside profiles.d emits an error message and will be treated
as nil.
A profile defined multiple times will error and "crash" the loading of profiles,
such that profiles return nil.
The errors will only be emitted once for user-friendliness.
This commit handles three major bugs with the current way of redirecting input
from Leiningen to a sub-process:
- The redirection is never stopped. This means that typing on the keyboard after
a sub-process has finished will crash the thread redirecting data from *in* to
the sub-process' input stream, as it is closed.
- The redirection is buffered. This means that data intended to a subsequent
sub-process may be sent to this sub-process instead.
- The redirection blocks instead of busy waits. For the output streams, this is
perfectly fine and the recommended approach to avoid wasting cycles. However,
this has some issues when done to an input stream: If the sub-process finishes
while the thread block waiting for a character, we will be unable to stop the
thread before a character has been read. The consequence is that a character
originally intended to the subsequent sub-process will be given to the
previous process.
These issues are solved by reading one byte at a time, busy wait on data and
gracefully exit when the sub-process has ended (through a mutable
variable/atom).
By treating the `:user` profile in `profile.clj` as the project map when one's
outside of a project, the default repositories among with any mentioned
repositories within the `:user` profile will be fetched without any issues. Also
works fine when `profile.clj` doesn't contain any `:user` profile or no
`profile.clj` exists.
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.
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.
Previously the output for downloading files would just say "failed to find".
Instead output the fact checksums were invalid, and from which repository.
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.
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*.