Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.0] Fix duplicate node #822

Merged
merged 3 commits into from
Apr 19, 2017

Conversation

fabien0102
Copy link
Contributor

Issue: #821

Small fix to avoid node duplication -> don't use contentDigest for node.id

(Maybe a good reason to use contentDigest but I don't understand why)

@gatsbybot
Copy link
Collaborator

gatsbybot commented Apr 19, 2017

Deploy preview ready!

Built with commit 19094e2

https://deploy-preview-822--gatsbygram.netlify.com

@gatsbybot
Copy link
Collaborator

gatsbybot commented Apr 19, 2017

Deploy preview ready!

Built with commit 19094e2

https://deploy-preview-822--gatsbyjs.netlify.com

@fabien0102
Copy link
Contributor Author

Arf, hot reloading not working after my fix… I'm on it ;)

@KyleAMathews
Copy link
Contributor

Hmmm... this makes a lot of sense. I've been a bit all over the place about what the relationship between the id and contentDigest should be. This helps clarify it. An id is stable between changes. It represents a known "thing" with a fairly stable identity. A contentDigest, on the other hand, is highly unstable and represents a very precise definition of the exact character of the object at any given time.

We also need to implement deleteNode so that, in the case of the filesystem, someone moves a file, the old nod is deleted and the new one created.

@KyleAMathews KyleAMathews merged commit 9ffb1fa into gatsbyjs:1.0 Apr 19, 2017
@KyleAMathews
Copy link
Contributor

I'll go through the other places we're creating nodes and remove contentDigest from them as well.

@fabien0102 fabien0102 deleted the 1.0-fix-duplicate-node branch April 19, 2017 19:35
mwfrost pushed a commit to mwfrost/gatsby that referenced this pull request Apr 20, 2023
* Pretty json output (easier to debug)

* Don't include contentDigest into node.id

It's cause duplication on content update

* Deal with contestDisgest changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants