-
-
Notifications
You must be signed in to change notification settings - Fork 516
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
Solving circular import hack #444
Conversation
This prevents problems with circular imports. I still get 14 warnings about circular imports in rollup (regardless of using the main commonjs plugin or the alternate one), but at least the emitted code seems to work fine in both now.
I can confirm that it solves #443 for me. |
@jakubroztocil Ping?.. |
A required fix is added in jkbrzt/rrule#444 Until that PR is merged, we will use the source commit directly.
Any chance we can get this merged? It's difficult using an unpublished fork in my project. |
I would if I could. As for me, I don't really care that much anymore. I have stopped using the dependency that had this as a dependency in my project - so don't count on me for solving the other circular import problems. |
A required fix is added in jkbrzt/rrule#444 Until that PR is merged, we will use a forked package publication.
A required fix is added in jkbrzt/rrule#444 Until that PR is merged, we will use a forked package publication.
I would be more than happy to help address remaining circular dependencies, as well as help maintaining project in general (we plan to start depending on it from |
In the interim I published a package with this change so I can use it in my project easier |
That's totally fair. Thanks again @olemartinorg for the work you did to get it to this point. It's been hugely helpful. |
I've been trying to solve this all day! I hope this gets merged soon! Thanks @olemartinorg ! |
getnlp._nlp = require('./nlp') | ||
} | ||
return getnlp._nlp | ||
} as GetNlp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rationale for this IIRC was to make nlp
an optional dependency - I had in mind to eventually split it out into its own package. But this simplifies things for now, so we should merge it.
ToText.IMPLEMENTED[Frequency.DAILY] = ['byhour'].concat(common) | ||
ToText.IMPLEMENTED[Frequency.WEEKLY] = common | ||
ToText.IMPLEMENTED[Frequency.MONTHLY] = common | ||
ToText.IMPLEMENTED[Frequency.YEARLY] = ['byweekno', 'byyearday'].concat(common) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Hooray, thank you! |
Amazing!!! |
@davidgoli would you also be able to publish a new release to NPM? I don't think I can use the changes in my project until a release has been made. |
Published 2.6.8 |
These fixes should prevent problems with circular imports. I still get 14 warnings about circular imports in rollup (regardless of using the main commonjs plugin or the alternate one), but at least the emitted code seems to work fine in both now.
This fixes #443 and hopefully #430, although I haven't been able to reproduce the issue in webpack.
I also looked into extracting other circular usages (like
totext.ts
accessingRRule.FREQUENCIES
), but that quickly produced quite a lot of changes. I can continue trying to weed out the rest of the circular import warnings if you want, just let me know.Thanks for contributing to
rrule
!To submit a pull request, please verify that you have done the following:
master
commitaddressing