GithubHelp home page GithubHelp logo

Comments (24)

skoropadas avatar skoropadas commented on July 2, 2024 1

@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.

R-Bower avatar R-Bower commented on July 2, 2024 1

Cool, thanks for the quick response!

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024 1

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.

R-Bower avatar R-Bower commented on July 2, 2024 1

There are only two hard things in Computer Science: cache invalidation and naming things.

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024 1

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.

R-Bower avatar R-Bower commented on July 2, 2024 1

I can get caching to work in dev mode by following these steps:

  1. Set cache: false in ng-doc.config.ts
  2. Build
  3. Set cache: true in ng-doc.config.ts
  4. Serve in dev mode.

It's quite fast. Looking forward to when this is fixed :)

from ng-doc.

R-Bower avatar R-Bower commented on July 2, 2024 1

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.

skoropadas avatar skoropadas commented on July 2, 2024 1

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.

R-Bower avatar R-Bower commented on July 2, 2024 1

Anytime, happy to help!

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024 1

@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.

skoropadas avatar skoropadas commented on July 2, 2024

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 the ng-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.

R-Bower avatar R-Bower commented on July 2, 2024

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.

R-Bower avatar R-Bower commented on July 2, 2024

Confirmed working with cache: false.

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024

@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.

R-Bower avatar R-Bower commented on July 2, 2024

Sure, I'll give it a go today!

from ng-doc.

R-Bower avatar R-Bower commented on July 2, 2024

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.

R-Bower avatar R-Bower commented on July 2, 2024

Feel free to release some pre-release builds and I'll test them for you.

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024

Feel free to release some pre-release builds and I'll test them for you.

That would be awesome! Thank you! 😊

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024

I can get caching to work in dev mode by following these steps:

  1. Set cache: false in ng-doc.config.ts
  2. Build
  3. Set cache: true in ng-doc.config.ts
  4. 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.

R-Bower avatar R-Bower commented on July 2, 2024

This appears to be working, will keep testing and let you know.

from ng-doc.

skoropadas avatar skoropadas commented on July 2, 2024

This appears to be working, will keep testing and let you know.

Ok, thank you 👍

from ng-doc.

R-Bower avatar R-Bower commented on July 2, 2024

I thought I commented this yesterday, but apparently it didn't get posted. The app fails to build in this situation:

  1. Create ng-doc page.
  2. Start dev mode or build.
  3. Stop dev mode.
  4. Remove ng-doc page.
  5. 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.

skoropadas avatar skoropadas commented on July 2, 2024

I thought I commented this yesterday, but apparently it didn't get posted. The app fails to build in this situation:

  1. Create ng-doc page.
  2. Start dev mode or build.
  3. Stop dev mode.
  4. Remove ng-doc page.
  5. 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.

skoropadas avatar skoropadas commented on July 2, 2024

🎉 This issue has been resolved in version 16.5.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

from ng-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.