Skip to content
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

Build fails with NPE #21

Closed
arichiardi opened this issue Feb 16, 2016 · 9 comments
Closed

Build fails with NPE #21

arichiardi opened this issue Feb 16, 2016 · 9 comments

Comments

@arichiardi
Copy link
Contributor

If I understood correctly with :build I am supposed to get rid of the SNAPSHOT part right?

When I try: boot version -b inc I get:

             clojure.lang.ExceptionInfo: java.lang.NullPointerException
    data: {:file "/tmp/boot.user7119306331923366147.clj", :line 45}
java.util.concurrent.ExecutionException: java.lang.NullPointerException
         java.lang.NullPointerException: 
                                ...                
                   clojure.core/inc  core.clj:  892
                                ...                
 boot-semver.core/update-version/fn  core.clj:   53
clojure.core/merge-with/merge-entry  core.clj: 2932
               clojure.core/reduce1  core.clj:  909
     clojure.core/merge-with/merge2  core.clj: 2935
               clojure.core/reduce1  core.clj:  909
               clojure.core/reduce1  core.clj:  900
            clojure.core/merge-with  core.clj: 2936
                                ...                
    boot-semver.core/update-version  core.clj:   53
       boot-semver.core/eval2392/fn  core.clj:   84
                                ...                
                 clojure.core/apply  core.clj:  630
          boot.core/construct-tasks  core.clj:  760
                                ...                
                 clojure.core/apply  core.clj:  630
                  boot.core/boot/fn  core.clj:  805
clojure.core/binding-conveyor-fn/fn  core.clj: 1916
                                ...         
@arichiardi
Copy link
Contributor Author

Probably I am not using it correctly, I just would like version to remove the -SNAPSHOT or -alpha, aka build a release version.

@burn2delete
Copy link
Member

The task does not make changes to parts of the version string which are not defined.

Try:

boot version –r empty –b one

Then:

boot version –b inc

@burn2delete
Copy link
Member

I just pushed version 1.2.2 - This will avoid the NPE above.

boot version -r empty -b inc

This will now work when the semver element is not in the version string.

@burn2delete
Copy link
Member

Some NPE still not handled correctly

@burn2delete burn2delete reopened this Feb 16, 2016
@arichiardi
Copy link
Contributor Author

Also try boot version -n -r inc, I know it does not make sense as command, but you'd probably want to warn the user.

@burn2delete
Copy link
Member

@arichiardi 1.2.2 will correct that to X.Y.Z-1

@burn2delete
Copy link
Member

working on a better solution to the NPE right now.

@burn2delete
Copy link
Member

@arichiardi 1.2.4 has been pushed to clojars. This should avoid all the issues in this thread. Closing.

@arichiardi
Copy link
Contributor Author

Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants