Skip to content
This repository has been archived by the owner on Apr 11, 2020. It is now read-only.

explaining sketch().run() #56

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

tpltnt
Copy link
Contributor

@tpltnt tpltnt commented Mar 23, 2020

Hi there,

I added a small section on updating code to the guide. I did run into the sketch().run() thing and so I documented the solution in the guide. (Since the github issue feels like a temporary hack to me).

Cheers,
tpltnt

Copy link
Member

@mitchmindtree mitchmindtree left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @tpltnt !

The developer reference is intended to be for developers working on the nannou code-base itself. Perhaps this addition would be better suited under Updating nannou section?

Sometimes you have to touch old code and make it work in a new environment.
This sections helps you deal with problems you might encounter.

In general it helps to read all the CHANGELOG files from your (old) source
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for brackets here

version to the target you want to upgrade to.


## Sketches don't run
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps we should put the "Sketches don't run" and "with_dimension is gone" under a "Version 0.13 Changes" heading? It might help to clarify in the future that these changes are specific to version 0.13 e.g.

## Version 0.13 Changes

### Sketches don't run

...

## Window sizing does not work / with_dimension is gone

...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now they are specific to 0.13, but I advise against it. Later people are going to look for their problems (in the headings) and not for version changes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the version number can be useful for checking which changes occurred during the period of time since the user updated their code. The sub-headings can still be there.

nannou::sketch(view).size(width, height).run()
```

This required changing the `sketch()` function to return a builder type rather than running immediately (as done in the past).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for brackets

```

This required changing the `sketch()` function to return a builder type rather than running immediately (as done in the past).
Specifying the size of a window in the view function felt awkward (and caused a panic on Windows after a winit update).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for brackets

@mitchmindtree
Copy link
Member

As mentioned in my last comment, is it possible to move this to the existing Updating nannou section? I don't think we need a whole chapter for this.

In general, this sort of information is what the CHANGELOG is intended to provide. Perhaps instead of adding this section, we can move the CHANGELOG into the guide? I might do this as a part of nannou-org/nannou#449.

@tpltnt
Copy link
Contributor Author

tpltnt commented Mar 26, 2020

I missed the part about moving the text. I adjusted everything accordingly.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants