-
-
Notifications
You must be signed in to change notification settings - Fork 56
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
Rename task.h to qcorotask.h #70
Comments
You should use I agree that |
Most files in the library are prefix with qcoro, so this ensures we are more consistent (done in light of #70).
If I include Task.h, which is a private project header, linker uses qcoro/task.h instead (private Task.h is in separate dll). This forced me to do ugly patch before creating package, just to be able to use both. Additionally, I cannot really rename private Task.h header, as it has been in project for a while and people got very familiar with it. It would create a lot of confusion I think. It being a base class also doesn't help. It is true that just removing task.h is not good at all. But, renaming the implementation file and providing new header would be great. On top of that some CMake option to enable/disable legacy header could be added to provide backwards compatibility. So, my proposal is: |
Most files in the library are prefix with qcoro, so this ensures we are more consistent (done in light of #70).
Renaming Task to QCoroTask + CMake option to keep/disable task.h sound good to me. The On second thought, I'm about to introduce generators and I don't know whether I also want to have QCoroGeneratorFwd and QCoroAsyncGenreatorFwd. Maybe just QCoroFwd that would forward declare all the public QCoro types would be good enough. What do you think? |
Great! QCoroFwd sound good to me! |
The task.h (QCoro/Task) header is deprecated now and produces a warning that users should switch to qcorotask.h (QCoro/QCoroTask) header. The warning can be disabled by passing -DQCORO_NO_WARN_DEPRECATED_TASK_H to the compiler. The header will be removed in some future versions of QCoro.
The task.h (QCoro/Task) header is deprecated now and produces a warning that users should switch to qcorotask.h (QCoro/QCoroTask) header. The warning can be disabled by passing -DQCORO_NO_WARN_DEPRECATED_TASK_H to the compiler. The header will be removed in some future versions of QCoro.
Deprecate task.h in favor of qcorotask.h (#70)
I've merged #76 to main, which deprecates |
All headers in QCoro have QCoro prefix, except for Task. There can be different libraries (private or public) which also use this term. It would be more readable and less conflicting to rename it to QCoroTask.
Additionally QCoroTaskFwd could be introduced to reduce code duplication when forward declaring coroutines in headers:
The text was updated successfully, but these errors were encountered: