# Running in world age ... while current world is

**URL:** <https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113>\
**Category:** General Usage\
**Tags:** world\_age\
**Created:** [April 13, 2019, 3:42pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113 "2019-04-13T15:42:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [April 13, 2019, 3:42pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/1 "2019-04-13T15:42:26Z")

</div>

Hi,

When I run some functions in Julia I obtain this error: The applicable method may be too new: running in world age 26887, while current world is 26894.

If I run the code again, there is no error. This is a systematic behavior, every time I start Julia.

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [April 13, 2019, 8:13pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/2 "2019-04-13T20:13:02Z")

</div>

Maybe try updating Julia? What version of Julia are you on? And did you download binaries, or build from source?

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [April 13, 2019, 8:21pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/3 "2019-04-13T20:21:45Z")

</div>

I just downloaded the latest version of JuliaPro and I am running it from there. Does it help?

---

<div class="post-metadata">

**Author:** ![stevengj](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stevengj/32/71_2.png) [@stevengj](https://discourse.julialang.org/u/stevengj)\
**Post date:** [April 14, 2019, 2:24am UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/4 "2019-04-14T02:24:49Z")

</div>

This usually means that you are using `eval` to define new functions inside your function and then trying to call them. See the explanation here: [Help calling a function defined from expressions - #4 by stevengj](https://discourse.julialang.org/t/help-calling-a-function-defined-from-expressions/1340/4)

Calling `eval` inside a function is _almost_ always the wrong thing to do. Often new Julia programmers make the mistake of trying to build up inner functions from strings or symbolic expressions that they `eval`, when the right thing is to just pass/define functions directly using `->`.

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [April 14, 2019, 1:56pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/5 "2019-04-14T13:56:42Z")

</div>

Check your startup.jl (under ~/.julia/config/ I believe). I’m sure you’re doing something similar to what Steven is indicating.

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [May 18, 2019, 5:45pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/6 "2019-05-18T17:45:26Z")

</div>

Where do I find the file startup.jl? Also, I am not sure how I am using eval the way you suggest. Just to be clear, once I re-run the code the second time, I have no issue.

What I do: I create a mutable struct and then a function y that takes it as argument and runs a function x inside. Then I use pmap on the function y. Please let me know if I should provide any more detailed information. Thank you!

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [May 19, 2019, 3:03pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/7 "2019-05-19T15:03:38Z")

</div>

> [@juliauser](#):
>
> Where do I find the file startup.jl?

The startup file is `~/.julia/config/startup.jl` as I indicated previously.

> [@juliauser](#):
>
> Please let me know if I should provide any more detailed information.

Please do, it’ll make it easier for us to give you a concrete solution instead of a bunch of hand-waving about possible solutions 🙂

---

<div class="post-metadata">

**Author:** ![juliauser](https://avatars.discourse-cdn.com/v4/letter/j/46a35a/32.png) [@juliauser](https://discourse.julialang.org/u/juliauser)\
**Post date:** [May 19, 2019, 8:03pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/8 "2019-05-19T20:03:22Z")

</div>

This is the content of my startup.jl file

# DO NOT EDIT THIS FILE, ALL THE CONTENTS OF THIS FILE WILL BE DELETED ON EVERY LAUNCH OF JULIAPRO

popfirst!(DEPOT\_PATH)  
ENV[“JULIA\_PKG\_SERVER”] = “[https://pkg.juliacomputing.com/](https://pkg.juliacomputing.com/)”  
ENV[“JULIA\_PKG\_TOKEN\_PATH”] = joinpath(homedir(),“.juliapro”,“token.toml”)  
ENV[“DISABLE\_FALLBACK”] = “true”  
using Pkg  
pushfirst!(DEPOT\_PATH,joinpath(homedir(),“.juliapro”,“JuliaPro\_v1.1.0.1”))

Also, the issue happens whenever I define a mutable struct inside a function. Does that make sense? Is it just something I should avoid?

---

<div class="post-metadata">

**Author:** ![jpsamaroo](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jpsamaroo/32/46804_2.png) [@jpsamaroo](https://discourse.julialang.org/u/jpsamaroo)\
**Post date:** [May 19, 2019, 9:00pm UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/9 "2019-05-19T21:00:14Z")

</div>

So, your startup.jl file is fine (in the future, please put your code between triple backticks (```) when posting to Discourse).

> [@juliauser](#):
>
> Also, the issue happens whenever I define a mutable struct inside a function.

Wait, how/why are you trying to do this? You cannot normally define a struct within a function unless you use `eval`, and trying to call it normally within that same function will fail in the same way as you’ve experienced. Can you show what you’re doing, and briefly describe your end-goal?

---

<div class="post-metadata">

**Author:** ![c42f](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/c42f/32/52842_2.png) [@c42f](https://discourse.julialang.org/u/c42f)\
**Post date:** [May 20, 2019, 3:56am UTC](https://discourse.julialang.org/t/running-in-world-age-while-current-world-is/23113/10 "2019-05-20T03:56:15Z")

</div>

> [@jpsamaroo](#):
>
> Can you show what you’re doing, and briefly describe your end-goal?

Agreed. Here’s some guidelines for clearly describing your problem:

> [@Please read: make it easier to help you](https://discourse.julialang.org/t/psa-make-it-easier-to-help-you/14757):
>
> Welcome to the Julia Discourse! We are enthusiastic about helping Julia programmers, both beginner and experienced. This public service announcement (PSA) outlines best practices when asking for help. Following these points makes it easier for us to help you and more likely you’ll get a prompt, useful answer. Keywords are highlighted to make it easier to refer to specific points. Choose a descriptive title that captures the key part of your question, eg “plots with multiple axes” instead of …
