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

Switch to standard Promises #1018

Closed
jason0x43 opened this issue Jan 10, 2020 · 2 comments · Fixed by #1091
Closed

Switch to standard Promises #1018

jason0x43 opened this issue Jan 10, 2020 · 2 comments · Fixed by #1091
Assignees
Labels
effort-high This will take a while priority-high Most important project-dev Updates to Intern's organization or dev process

Comments

@jason0x43
Copy link
Member

Intern 4.x makes extensive use of a Task class that provides cancellation and finally. Now that finally is part of standard promises, and given that cancellation isn't all that useful, the Task class should be replaced with Promise, and all APIs returning Tasks should now return PromiseLike.

The webdriver Command class should remain a custom Promise, but based on Promise rather than Task / CancellablePromise.

@jason0x43 jason0x43 added the project-dev Updates to Intern's organization or dev process label Jan 10, 2020
@jason0x43
Copy link
Member Author

A somewhat simpler way to implement cancellation that Intern currently does: https://gist.github.com/devpaul/140f58f8787306798a058c515db260d2

This could be useful in places where cancellation is useful.

@jason0x43
Copy link
Member Author

This is also necessary if we want to switch to async/await (which would make the code much easier to follow in many places) since async functions have to return native Promises.

@jason0x43 jason0x43 added effort-high This will take a while priority-medium This should get done, but it's not a high priority labels Jan 27, 2020
@jason0x43 jason0x43 self-assigned this Feb 1, 2020
jason0x43 added a commit that referenced this issue Feb 4, 2020
- All the types work out (not as bad as I expected)
- Cancellation has been disabled until a new API is worked out

references #1018

[ci skip]
jason0x43 added a commit that referenced this issue Feb 6, 2020
- All the types work out (not as bad as I expected)
- Cancellation has been disabled until a new API is worked out

references #1018

[ci skip]
jason0x43 added a commit that referenced this issue Feb 7, 2020
- All the types work out (not as bad as I expected)
- Cancellation has been disabled until a new API is worked out

references #1018

[ci skip]
@jason0x43 jason0x43 changed the title Remove Task (custom promise class) Switch to standard Promises Feb 10, 2020
jason0x43 added a commit that referenced this issue Feb 15, 2020
- All the types work out (not as bad as I expected)
- Cancellation has been disabled until a new API is worked out

references #1018

[ci skip]
jason0x43 added a commit that referenced this issue Feb 17, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Feb 17, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Feb 18, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Feb 20, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Feb 21, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
@jason0x43 jason0x43 added priority-high Most important and removed priority-medium This should get done, but it's not a high priority labels Feb 21, 2020
jason0x43 added a commit to jason0x43/intern that referenced this issue Jul 13, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references theintern#1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Jul 21, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
jason0x43 added a commit that referenced this issue Aug 10, 2020
- All async APIs now use native Promises -- no more Task or
CancellablePromise
- The cancellation API is mostly new. Command chains still provide a
`cancel` method. Tests, suites, and exector runs can be cancelled by
calling `cancel` on the test, suite, or executor.

references #1018

BREAKING CHANGE: async APIs now return native Promises, and
the cancellation API is entirely new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort-high This will take a while priority-high Most important project-dev Updates to Intern's organization or dev process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant