# Importing functions between notebooks - breaking changes?

**URL:** <https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245>\
**Category:** Help\
**Created:** [February 5, 2018, 6:09pm UTC](https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245 "2018-02-05T18:09:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Evan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/evan/32/276_2.png) [@Evan](https://talk.observablehq.com/u/Evan)\
**Post date:** [February 5, 2018, 6:09pm UTC](https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245/1 "2018-02-05T18:09:33Z")

</div>

When you import a function from another user’s notebook, are you essentially depending on that user to not change/update/delete that function in a way that breaks your notebook?

---

<div class="post-metadata">

**Author:** ![jashkenas](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/jashkenas/32/1778_2.png) [@jashkenas](https://talk.observablehq.com/u/jashkenas)\
**Post date:** [February 5, 2018, 6:29pm UTC](https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245/2 "2018-02-05T18:29:08Z")

</div>

At this point, during the initial release — yes, you essentially are depending on the other user not to break your notebook.

We hope to introduce **pinning** very soon for imports of other notebooks and of JavaScript libraries. When pinning is released, the first time you import an external library or notebook, the version that you load will be fixed in your notebook, and you’ll get the same version every time.

(Published notebooks are already versioned on every change, and you can pin your import against that version. In the future it’ll happen by default).

---

<div class="post-metadata">

**Author:** ![mbostock](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbostock/32/9_2.png) [@mbostock](https://talk.observablehq.com/u/mbostock)\
**Post date:** [February 6, 2018, 3:55am UTC](https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245/3 "2018-02-06T03:55:25Z")

</div>

To give an example, here’s an example of an _unpinned_ import that (currently) fetches the latest version of a notebook:

```auto
import {slider} from "@jashkenas/inputs"

```

Here’s an equivalent _pinned_ import that locks the current version of Jeremy’s [inputs notebook](https://beta.observablehq.com/@jashkenas/inputs):

```auto
import {slider} from "@jashkenas/inputs@750"

```

Currently you have to do a little digging in the developer console to discover what the latest published version is. In the future, we’d like automatic pinning where Observable magically rewrites imports of the unpinned form into the pinned form, thereby protecting you from breaking changes. And if you ever want to upgrade to the latest version of an imported notebook, you can simply delete the version number and re-run the import cell.

---

<div class="post-metadata">

**Author:** ![Evan](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/evan/32/276_2.png) [@Evan](https://talk.observablehq.com/u/Evan)\
**Post date:** [February 6, 2018, 2:03pm UTC](https://talk.observablehq.com/t/importing-functions-between-notebooks-breaking-changes/245/4 "2018-02-06T14:03:04Z")

</div>

Cool! The ability to share cells seems really useful.
