# AttoBot for Pkg3 projects

**URL:** <https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 13, 2018, 1:04pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371 "2018-08-13T13:04:50Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [August 13, 2018, 1:04pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/1 "2018-08-13T13:04:50Z")

</div>

Currently, new packages that only supports v0.7+ will not need the `REQUIRE` file, however attobot will require a `REQUIRE` file, how should I register (and maybe update) the package then? Or should I add a `REQUIRE` according to `Project.toml`?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 13, 2018, 1:58pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/2 "2018-08-13T13:58:59Z")

</div>

For the moment, yes, use REQUIRE files and register to METADATA.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 25, 2018, 12:49pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/3 "2018-08-25T12:49:55Z")

</div>

Is it OK to add a `REQUIRE` in addition to `Project.toml`, with of course identical contents (except for standard libraries)?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [August 25, 2018, 1:28pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/4 "2018-08-25T13:28:31Z")

</div>

Yes.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 29, 2018, 12:21pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/5 "2018-08-29T12:21:14Z")

</div>

Is there a timeframe for dropping the requirement for `REQUIRE` for registered packages? The 1.0 manual does not even mention it, yet it is still required in practice for package registration.

Just asking because if it will be with us in the medium run, I would just generate `REQUIRE` from `Project.toml` using a git hook.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 30, 2018, 8:49am UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/6 "2018-08-30T08:49:00Z")

</div>

My current workaround is the script

```julia
#!/usr/bin/env julia
######################################################################
# Overwrite REQUIRE using dependency information from Project.toml.
#
# Call from the root of the package repository.
#
# Has some basic sanity checks, but **use at your own risk** , `REQUIRE`
# will be overwritten.
######################################################################

import Pkg
const PT = Pkg.Types

Pkg.activate(pwd()) # current directory as the project
ctx = PT.Context()
pkg = ctx.env.pkg
if pkg ≡ nothing
    @error "Not in a package, I won't generate REQUIRE."
    exit(1)
else
    @info "found package" pkg = pkg
end

deps = PT.get_deps(ctx)
non_std_deps = sort(collect(setdiff(keys(deps), values(ctx.stdlibs))))

open("REQUIRE", "w") do io
    for d in non_std_deps
        println(io, d)
        @info "listing $d"
    end
end

```

which I call manually to generate `REQUIRE`. Hope this will be fixed soon, I opened an issue

[https://github.com/attobot/attobot/issues/50](https://github.com/attobot/attobot/issues/50)

---

<div class="post-metadata">

**Author:** ![Roger-luo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/roger-luo/32/3399_2.png) [@Roger-luo](https://discourse.julialang.org/u/Roger-luo)\
**Post date:** [January 13, 2019, 6:58am UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/7 "2019-01-13T06:58:59Z")

</div>

Is there any update on AttoBot recently? Or and plans?

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [January 13, 2019, 8:05pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/8 "2019-01-13T20:05:34Z")

</div>

One question about your script, @Tamas_Papp - it doesn’t seem to generate a `julia x.y` entry in the “REQUIRE” file. Is that intentional?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 14, 2019, 9:28am UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/9 "2019-01-14T09:28:25Z")

</div>

Yes, it is, since it is not something the script can easily determine.

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [January 14, 2019, 10:25am UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/10 "2019-01-14T10:25:54Z")

</div>

Thanks, I suspected that might be the reason. “Project.toml” doesn’t allow to specify a Julia version range, right?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [January 14, 2019, 11:23am UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/11 "2019-01-14T11:23:28Z")

</div>

It does, see [the docs](https://julialang.github.io/Pkg.jl/dev/compatibility/# **6.** -Compatibility-1).

It is rather that the script was intended to be as a super-simple workaround, and only gives package _names_, not versions, at the moment.

If anyone has the time to extend it, they are welcome to do modify it.

---

<div class="post-metadata">

**Author:** ![oschulz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oschulz/32/2998_2.png) [@oschulz](https://discourse.julialang.org/u/oschulz)\
**Post date:** [January 14, 2019, 12:46pm UTC](https://discourse.julialang.org/t/attobot-for-pkg3-projects/13371/12 "2019-01-14T12:46:45Z")

</div>

> [@Tamas\_Papp](#):
>
> It does, see [the docs](https://julialang.github.io/Pkg.jl/dev/compatibility/# **6.** -Compatibility-1)

So it does, silly me. I think it’s because I’ve seen so many “Project.toml” files without Julia version spec around …
