GithubHelp home page GithubHelp logo

`neil add dep` erases deps.edn about neil HOT 12 CLOSED

akond avatar akond commented on June 19, 2024
`neil add dep` erases deps.edn

from neil.

Comments (12)

borkdude avatar borkdude commented on June 19, 2024

That's not good! We should probably check for a fully qualified name.

from neil.

borkdude avatar borkdude commented on June 19, 2024

I can't repro the "deps.edn becomes empty" part:

borkdude@m1 /tmp/dude $ neil dep add com.rpl/specter
borkdude@m1 /tmp/dude $ cat deps.edn
{:deps {com.rpl/specter {:mvn/version "1.1.4"}}
 :aliases {}}
borkdude@m1 /tmp/dude $ neil dep add com.rpl.specter
borkdude@m1 /tmp/dude $ cat deps.edn
{:deps {com.rpl/specter {:mvn/version "1.1.4"}
        com.rpl.specter {:mvn/version nil}}
 :aliases {}}

Can you provide a sequence like the above?

We should probably never add a dep when the version is nil.

from neil.

akond avatar akond commented on June 19, 2024

Here is my justfile:

akond@akond:~/workspace-test/xxxx$ cat justfile 
DIR:="issue-131"
run:
  rm -rf {{DIR}}
  neil new --name {{DIR}}
  hd {{DIR}}/deps.edn
  cd {{DIR}}; neil add dep com.rpl.specter
  hd {{DIR}}/deps.edn

So the result looks :

akond@akond:~/workspace-test/xxxx$ just
rm -rf issue-131
neil new --name issue-131
Creating project from org.corfield.new/scratch in issue-131
hd issue-131/deps.edn
00000000  7b 3a 70 61 74 68 73 20  5b 22 73 72 63 22 5d 0a  |{:paths ["src"].|
00000010  20 3a 64 65 70 73 20 20  7b 7d 0a 20 3a 61 6c 69  | :deps  {}. :ali|
00000020  61 73 65 73 20 0a 20 7b  3a 6e 65 69 6c 20 7b 3a  |ases . {:neil {:|
00000030  70 72 6f 6a 65 63 74 20  7b 3a 6e 61 6d 65 20 69  |project {:name i|
00000040  73 73 75 65 2d 31 33 31  2f 69 73 73 75 65 2d 31  |ssue-131/issue-1|
00000050  33 31 7d 7d 7d 7d 0a                              |31}}}}.|
00000057
cd issue-131; neil add dep com.rpl.specter
hd issue-131/deps.edn
00000000  0a                                                |.|
00000001

Please, notice, that I use com.rpl.specter and not com.rpl/specter

from neil.

borkdude avatar borkdude commented on June 19, 2024

Yes, you should use the fully qualified symbol, but we should have some error checking for this.

from neil.

borkdude avatar borkdude commented on June 19, 2024

Also please specify the version of neil you are using.

from neil.

akond avatar akond commented on June 19, 2024

akond@akond:~/workspace-test/xxxx$ neil --version
neil 0.1.46

from neil.

akond avatar akond commented on June 19, 2024

Yes, the repo name is bogus, but I don't think that emptying deps.edn is an adequate response.
And thank you for responding on such a short notice.

from neil.

borkdude avatar borkdude commented on June 19, 2024

but I don't think that emptying deps.edn is an adequate response

Fully agreed :) This should be fixed.

from neil.

borkdude avatar borkdude commented on June 19, 2024

Should be fixed with neil from master now. @akond Can you test this?

from neil.

akond avatar akond commented on June 19, 2024

Yes, now it keeps the file untouched.
But I get no warnings either.

from neil.

borkdude avatar borkdude commented on June 19, 2024

Very well, I'll release a new version

from neil.

borkdude avatar borkdude commented on June 19, 2024

I assume this is fixed. Please leave a message if it's not.

from neil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.