# Best practices for examples with Pkg3

**URL:** <https://discourse.julialang.org/t/best-practices-for-examples-with-pkg3/13356>\
**Category:** General Usage\
**Created:** [August 13, 2018, 11:17am UTC](https://discourse.julialang.org/t/best-practices-for-examples-with-pkg3/13356 "2018-08-13T11:17:51Z")\
**Posts on this page:** 1\
**Showing post:** 12

<div class="post-metadata">

**Author:** ![StefanKarpinski](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stefankarpinski/32/24_2.png) [@StefanKarpinski](https://discourse.julialang.org/u/StefanKarpinski)\
**Post date:** [August 13, 2018, 4:25pm UTC](https://discourse.julialang.org/t/best-practices-for-examples-with-pkg3/13356/12 "2018-08-13T16:25:30Z")

</div>

> [@Tamas\_Papp](#):
>
> Also, I don’t really see the issue about “pollution” of the environment, but if the user is concerned about that, they should `activate` another one.

Moreover, the targets mechanism makes it easy for the package to declare project environments that extend its own, just do:

```toml
[extras]
Bars = "<uuid>"

[targets]
examples = ["Bars"]

```

We still need an API to activate target environments (`pkg> activate Bars.examples`)?, but with that you could just do that and you’ll be able to run the examples from that environment easily.

---

_[View the full topic](https://discourse.julialang.org/t/best-practices-for-examples-with-pkg3/13356)._
