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

should .greenwood directory be cleared out on each build #230

Closed
1 of 5 tasks
thescientist13 opened this issue Oct 16, 2019 · 2 comments
Closed
1 of 5 tasks

should .greenwood directory be cleared out on each build #230

thescientist13 opened this issue Oct 16, 2019 · 2 comments
Assignees
Labels
chore unit testing, maintenance, etc question Further information is requested

Comments

@thescientist13
Copy link
Member

Type of Change

  • New Feature Request
  • Documentation / Website
  • Improvement / Suggestion
  • Bug
  • Other (please clarify below)

Summary

Just posing this as question coming out of our work in #213
#217 (comment)

Details

In this comment, was curious if wiping .greenwood/ was something we should do between builds? I know down the road this may not be desirable if we want to do any sort of local caching of remote data sources like with #21 , but maybe we could isolate that to .greenwood/cache/

@thescientist13 thescientist13 added the question Further information is requested label Oct 16, 2019
@thescientist13 thescientist13 added chore unit testing, maintenance, etc and removed question Further information is requested labels Oct 16, 2019
@thescientist13 thescientist13 changed the title should .greenwood directory be cleared out on each build .greenwood directory be cleared out on each build Oct 16, 2019
@thescientist13 thescientist13 added question Further information is requested chore unit testing, maintenance, etc and removed chore unit testing, maintenance, etc labels Oct 16, 2019
@hutchgrant
Copy link
Member

hutchgrant commented Oct 16, 2019

It's problematic because if you add/remove a page/route the app/app.js and app/list.js must be rebuilt/parsed. I suppose we could just wipe the .greenwood/app directory alone on change. As well, a single route change necessitates all routes in all serialized pages would have to be reserialized.

A single change to a template would affect all pages using that template. All components would have to re-scaffolded, recompiled, and re-serialized.

Also if any of the front-matter details change in a markdown file e.g. meta, or labelling, etc, we have to rebuild the component. Sure you could remove the previous component file, if it exists, then rewrite the file, recompile, and reserialize.

At the moment greenwood serializes every page, every time. To just serialize specific pages, modifications would have to be made as well.

There's room for optimizing but its a lot of effort and shouldn't be the immediate focus at the moment. What good is a speedier compile if the build itself is limited in features. You could spend months working to shave seconds off build time that only a developer will endure, or you could spend months adding cool features which make it far more useful to everyone else. I mean if you have the man power try for both but we don't have it.

Therefore it's easier, for now, if there's any changes to wipe the directory. This can change in the future.

@thescientist13 thescientist13 changed the title .greenwood directory be cleared out on each build should .greenwood directory be cleared out on each build Oct 18, 2019
@thescientist13
Copy link
Member Author

It seems like this is already happening, so nothing to do here. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore unit testing, maintenance, etc question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants