Comments (24)
@R-Bower ok great I think we've found the problem, I specifically made it so that the cache could be completely disabled by returning to the process as it was before the cache in case something like this happens, because the cache is quite a big feature and most likely will not work correctly on all projects from the start. I'll try to reproduce this locally and fix it, thank you for the feedback!
from ng-doc.
Cool, thanks for the quick response!
from ng-doc.
The reason that the project was built correctly after switching the builder is that NgDoc resets the cache after changing the configuration, so I decided to disable the cache function by default, I have not yet been able to reproduce a similar problem on other projects, apparently, its stability depends on the environment. It seems that the only way to solve it is to get a project in which it is reproduced so that it would be possible to debug its behavior and understand what's going on.
I'm also gonna refactor the builder, reduce the delay between the NgDoc and Angular builders, and maybe slightly increase the build speed, so maybe this problem will go away by itself, anyway will see!
from ng-doc.
There are only two hard things in Computer Science: cache invalidation and naming things.
from ng-doc.
It was working initially, but fails if I remove the
.ng-doc
folder contents and attempt a fresh build. I can't get it to work after that.
Got it, thank you 👍 I'll continue checking 🤔
from ng-doc.
I can get caching to work in dev mode by following these steps:
- Set
cache: false
inng-doc.config.ts
- Build
- Set
cache: true
inng-doc.config.ts
- Serve in dev mode.
It's quite fast. Looking forward to when this is fixed :)
from ng-doc.
So far I've tested the following:
- Start dev mode without .ng-doc folder.
- Start dev mode with .ng-doc folder from previous build.
- Start dev mode with .ng-doc folder, but the folder is empty.
- Build without .ng-doc folder.
Everything seems to be working as expected. Hot reloading is also working.
from ng-doc.
So far I've tested the following:
- Start dev mode without .ng-doc folder.
- Start dev mode with .ng-doc folder from previous build.
- Start dev mode with .ng-doc folder, but the folder is empty.
- Build without .ng-doc folder.
Everything seems to be working as expected. Hot reloading is also working.
Awesome! Then I will merge the changes, and release them together with the next version. But I think let this feature be turned off by default for now, if there are no other problems with it in the future, then I will turn it on. Thanks a lot for the feedback! 👍
from ng-doc.
Anytime, happy to help!
from ng-doc.
@R-Bower it's not reproducible in my new branch, so maybe I've already fixed it 🙃 I want to test a new feature and changes that I've done and release them tomorrow, so let's wait a bit :)
from ng-doc.
Looks like something was not generated correctly, few questions to understand your issue better:
- Did you migrate to 16.3.x using this #57 migration?
- Does it work if you provide
cache: false
in theng-doc.config.ts
?
Migration should migrate properties from ng-doc.dependencies.ts
to ng-doc.page.ts
and remove ng-doc.dependencies.ts
files.
from ng-doc.
I did migrate, yeah. I also removed all of my page modules and converted every demo component to standalone. I'll try with cache disabled and see if it fixes the issue.
from ng-doc.
Confirmed working with cache: false
.
from ng-doc.
@R-Bower hey, could you try to enable the cache on version 16.4.x and try to build the app several times? I wonder if this problem has been solved 🤔
from ng-doc.
Sure, I'll give it a go today!
from ng-doc.
It was working initially, but fails if I remove the .ng-doc
folder contents and attempt a fresh build. I can't get it to work after that.
from ng-doc.
Feel free to release some pre-release builds and I'll test them for you.
from ng-doc.
Feel free to release some pre-release builds and I'll test them for you.
That would be awesome! Thank you! 😊
from ng-doc.
I can get caching to work in dev mode by following these steps:
- Set
cache: false
inng-doc.config.ts
- Build
- Set
cache: true
inng-doc.config.ts
- Serve in dev mode.
It's quite fast. Looking forward to when this is fixed :)
Maybe I know what the problem is, can you try the 16.4.3-beta.1 version?
So, the cache should be invalidated if the .ng-doc
folder doesn't exist but if only one file there was changed there, then the cache should be invalidated only for the page that depends on this file.
from ng-doc.
This appears to be working, will keep testing and let you know.
from ng-doc.
This appears to be working, will keep testing and let you know.
Ok, thank you 👍
from ng-doc.
I thought I commented this yesterday, but apparently it didn't get posted. The app fails to build in this situation:
- Create ng-doc page.
- Start dev mode or build.
- Stop dev mode.
- Remove ng-doc page.
- Start dev mode.
The page can't be found and an error is thrown in .ng-doc/app/ng-doc.routing.ts
. The app doesn't compile until the offending route is removed from the routes config in this file. Removing the entire .ng-doc
folder and restarting also works in this circumstance.
from ng-doc.
I thought I commented this yesterday, but apparently it didn't get posted. The app fails to build in this situation:
- Create ng-doc page.
- Start dev mode or build.
- Stop dev mode.
- Remove ng-doc page.
- Start dev mode.
The page can't be found and an error is thrown in
.ng-doc/app/ng-doc.routing.ts
. The app doesn't compile until the offending route is removed from the routes config in this file. Removing the entire.ng-doc
folder and restarting also works in this circumstance.
I'll check it, thank you! I also found other bugs related to the cache and auto-rebuild when the cache is enabled. I'll release it with a new feature soon.
from ng-doc.
🎉 This issue has been resolved in version 16.5.0 🎉
The release is available on:
v16.5.0
- GitHub release
Your semantic-release bot 📦🚀
from ng-doc.
Related Issues (20)
- [Bug] ng-doc.routing.ts incorrect generated import HOT 10
- [Bug] input aliasing decorator selector not rendered correctly HOT 4
- [Feature] Support template variables for inputs HOT 11
- [Bug] hidden: true in NgDocPage-Config does not avoid displaying a component in the navigation. HOT 7
- [Bug] Table of contents link does not work properly with basehref HOT 4
- [Bug] Unable to leverage Keywords to create custom links in a reusable macro template HOT 8
- [Feature] Unable to leverage Custom Angular Components in the Markdown file HOT 5
- Support for Mermaid HOT 7
- [Bug] Unable to build docs when Playground refers components from angular library HOT 3
- [Bug] Extra /docs is introduced in the home icon of the breadcrumb during configuration of NgDoc route prefix HOT 4
- [Bug] Unable to display demo details of the components from angular library HOT 3
- [Query] Is it possible to import macros from angular library? HOT 4
- [Bug]Unable to customize the title of the API page HOT 1
- [Bug] The id of the html header is not serialized HOT 2
- Support for native i18n / $localize + localized markdown HOT 3
- [Feature] Demo Pane viewport and theme support
- [Feature] Custom Tabs in Demo HOT 4
- [Feature] Display Component Properties in Component Tabs and on Page
- [Bug] Configure Home icon route path of breadcrumb
- Add plugin for customizing the transformation of markdown to HTML
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ng-doc.