# Broadcast inside of \`@mtkmodel\` macro causes precompilation failures when put into a package

**URL:** <https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277>\
**Category:** General Usage\
**Tags:** question, modelingtoolkit\
**Created:** [December 7, 2023, 3:06pm UTC](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277 "2023-12-07T15:06:39Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![BambOoxX](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bambooxx/32/22179_2.png) [@BambOoxX](https://discourse.julialang.org/u/BambOoxX)\
**Post date:** [December 10, 2023, 11:59am UTC](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277/11 "2023-12-10T11:59:08Z")

</div>

Hum, so I followed you advice and wiped out my `.julia`. Took a bit of time, but after red-downloading and recompiling everything, I get the same error unfortunately.  
The registry is up to date as far as I can tell.  
However, I think I managed to narrow down a bit the error.

If I remove further lines form `MassXYZ` and do

```julia
@mtkmodel MassXYZ begin
    @parameters begin
        m
        v_0[1:3]
        s_0[1:3]
    end
end

```

it fails the same but if I remove the `1:3` and leave `v_0` and `s_0` as scalars, it compiles fine.

---

_[View the full topic](https://discourse.julialang.org/t/broadcast-inside-of-mtkmodel-macro-causes-precompilation-failures-when-put-into-a-package/107277)._
