-
Notifications
You must be signed in to change notification settings - Fork 175
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
[Fix #143] Inline dependencies #183
Conversation
|
||
`lein with-profile +plugin.mranderson/config test` | ||
|
||
note the plus sign before the leiningen profile. For this leining profile to work **you need leiningen version 2.5.0+!** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: leining
build failure: I guess I messed up building mranderson with java8 and not setting target/source version etc. will repackage this evening. pls check the oracle java8 build for now |
@@ -1,25 +1,22 @@ | |||
(def VERSION "0.9.0-SNAPSHOT") | |||
|
|||
(def VERSION-FORM `(do (require 'cider-nrepl.plugin) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aren't you breaking the plugin by removing this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i deliberately just removed this as this deffo caused the problems i struggled with (see last comments on #143). If I understood project.clj right this magic was only used in dev
profile... is that right? why do you need this in dev? what is the usual dev workflow which needs this trick?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We read in plugin.clj
. It's a somewhat lame setup and I've been meaning to change this for a while.
You'll need to rebase this. |
|
||
`lein do clean, source-deps` | ||
|
||
this creates the munged local dependencies in target/srcdeps directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this -> This
Add the missing .
to the sentence.
Wrap target/srcdeps
in backticks.
This has to be rebased. Btw, if you don't use the |
will rebase and also squash commits. dev workflow: in short yes. in more details you have two options. You start up your REPL as usual and work as usual, you might want to make sure that you run That said it is important to test the code after it is mrandersoned specially if you changed/upgraded dependencies. Also note that the final jar will be much bigger than before as it is practically an uberjar only the deps are in a deeply nested directory structure. |
- use mranderson (v0.4.2) to inline dependencies at package time - simple build script to help working with mranderson - exit if any build step fails - bit of explanation in readme - travis file modified accordingly - do **not** use mranderson for code check jobs - explicitly add the project file to the jar and read it from the plugin
all rebased and squashed. couple of notes:
|
Don't you have such checks in refactor-nrepl as well?
The difference is tiny so we can ignore it.
That's odd, although if the |
no, at least not automated with travis. running them with mranderson would mean to check your dependencies' code too, so not sure that makes much sense the plugin works on the same principals but the file location in the jar is different |
[Fix #143] Inline dependencies
👍 Let's rock! |
Hmm, the tests are failing for me:
/cc @Malabarba This happened when I ran |
The travis build also failed. @benedekfazekas guess your branch was not up-to-date or something. Please, look into this. |
will do |
i see a different error both locally and on travis: Exception in thread "main" java.io.FileNotFoundException: Could not locate debugger/time__init.class or debugger/time.clj on classpath: , compiling:(cider/nrepl/middleware/debug_test.clj:1:1)
at clojure.lang.Compiler.load(Compiler.java:7142)
at clojure.lang.RT.loadResourceScript(RT.java:370)
at clojure.lang.RT.loadResourceScript(RT.java:361) the cause of this error is that the reason of this not showing up before that @Malabarba just moved this test ns to the right place lately. possible solutions include i guess
|
I like the second option better. :-) |
I guessed so actually ;) I will try to find time to look at this asap |
|
||
# runs source-deps and tests and then provided lein target with mranderson | ||
|
||
function check_result { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set -e
would make this simpler? http://unix.stackexchange.com/a/166053/3398
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like it. although what do you think of http://mywiki.wooledge.org/BashFAQ/105
btw @bbatsov surely will wlc a PR ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tests pass, not yet tested the built middleware tho (will do) but ready for a review I suppose.