# MacroTools combinedef problem with master but not 1.5.2

**URL:** <https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534>\
**Category:** General Usage\
**Created:** [October 17, 2020, 7:42am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534 "2020-10-17T07:42:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Colin\_Beckingham](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/colin_beckingham/32/4878_2.png) [@Colin\_Beckingham](https://discourse.julialang.org/u/Colin_Beckingham)\
**Post date:** [October 17, 2020, 7:42am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534/1 "2020-10-17T07:42:57Z")

</div>

After recompile of master (`Version 1.6.0-DEV.1262 (2020-10-17)`) this morning I can no longer get MacroTools to work. It seems to work fine in 1.5.2 but test MacroTools fails with one error.

```julia
MacroTools: Error During Test at /home/colin/.julia/packages/MacroTools/X77lQ/test/runtests.jl:4
  Got exception outside of a @test
  LoadError: UndefVarError: f not defined
  Stacktrace:
    [1] macro expansion
      @ ~/.julia/packages/MacroTools/X77lQ/src/utils.jl:44 [inlined]

```

A related issue might concern `combinedef` which is suddenly unknown, even though `splitdef` is fine. I wonder if it is as simple as `combinedef` missing from `export` in `utils`?

---

<div class="post-metadata">

**Author:** ![simeonschaub](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/simeonschaub/32/216566_2.png) [@simeonschaub](https://discourse.julialang.org/u/simeonschaub)\
**Post date:** [October 17, 2020, 9:45am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534/2 "2020-10-17T09:45:33Z")

</div>

This should be fixed by [https://github.com/FluxML/MacroTools.jl/pull/147](https://github.com/FluxML/MacroTools.jl/pull/147), but you will need to use the latest master of MacroTools.jl for now, since there hasn’t been a new release yet.

---

<div class="post-metadata">

**Author:** ![cstjean](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cstjean/32/1444_2.png) [@cstjean](https://discourse.julialang.org/u/cstjean)\
**Post date:** [October 18, 2020, 6:01am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534/3 "2020-10-18T06:01:46Z")

</div>

> [@Colin\_Beckingham](#):
>
> I wonder if it is as simple as `combinedef` missing from `export` in `utils` ?

Yes, we should export it. Would you like to make a PR and update the README? I didn’t export it initially because I wrote it “just for the tests”, but it proved more convenient than manually writing the new function definition.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [October 18, 2020, 10:15am UTC](https://discourse.julialang.org/t/macrotools-combinedef-problem-with-master-but-not-1-5-2/48534/4 "2020-10-18T10:15:26Z")

</div>

[Invenia/ExprTools.jl](https://github.com/invenia/ExprTools.jl) has a more robust and much more tested version of `splitdef` and `combinedef`.

There is an open PR to make MacroTools just reexport those definitions.  
[https://github.com/FluxML/MacroTools.jl/pull/132](https://github.com/FluxML/MacroTools.jl/pull/132)
