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

feat: add support for workspace folders #153

Merged
merged 38 commits into from
May 13, 2021
Merged

feat: add support for workspace folders #153

merged 38 commits into from
May 13, 2021

Conversation

aminya
Copy link
Member

@aminya aminya commented May 6, 2021

@aminya aminya force-pushed the workspaceFolders branch 2 times, most recently from 3781f83 to b7e1d06 Compare May 6, 2021 06:41
@aminya aminya force-pushed the workspaceFolders branch from b7e1d06 to 8320bc8 Compare May 6, 2021 07:08
@aminya aminya marked this pull request as ready for review May 6, 2021 07:08
@aminya aminya force-pushed the workspaceFolders branch from 2a0a653 to 54003e4 Compare May 6, 2021 07:42
lib/server-manager.ts Outdated Show resolved Hide resolved
@aminya aminya force-pushed the workspaceFolders branch from 177a128 to 9cfced0 Compare May 6, 2021 10:08
@aminya aminya force-pushed the workspaceFolders branch from 25c0089 to 38bed61 Compare May 6, 2021 13:02
@aminya aminya force-pushed the workspaceFolders branch from 38bed61 to 5fc541f Compare May 6, 2021 13:03
@aminya aminya added the enhancement New feature or request label May 6, 2021
typings/spawk/index.d.ts Outdated Show resolved Hide resolved
@@ -60,6 +60,7 @@ export class ServerManager {
this._disposable.add(atom.project.onDidChangeFiles(this.projectFilesChanged.bind(this)))
}
}
this._isStarted = true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an irrelevant bug that I discovered here.

lib/server-manager.ts Outdated Show resolved Hide resolved
@aminya aminya force-pushed the workspaceFolders branch from 762fa7e to 587803f Compare May 6, 2021 21:05
@aminya aminya requested a review from UziTech May 9, 2021 04:53

async function afterEachCallback() {
serverManager.stopListening()
await serverManager.stopAllServers()
Copy link
Member

@UziTech UziTech May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the tests are timing out at this line. When calling beforeEachCallback() at the end of the test before the afterEach is called it resets serverManager so there are no servers to stop.

Copy link
Member Author

@aminya aminya May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was working with Sinon. I think this is related to the way jasmine mocks things.

Here is the old working commit before switching to jasmine.
764b050

Copy link
Member Author

@aminya aminya May 13, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does any of the Jasmine plugins modify clearTimeout and setTimeout functions? Does Jasmine support async functions inside afterEach and beforeEach?

I had the exact same problem in this PR.
This code was not timing out with Mocha, Sinon, Chai

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does any of the Jasmine plugins modify clearTimeout and setTimeout functions?

Not unless jasmin.clock.install() is called.

Does Jasmine support async functions inside afterEach and beforeEach?

yes

This code was not timing out with Mocha, Sinon, Chai

This was most likely because of a difference in sinon. sinon.spy calls the function by default and spyOn stubs the function by default.

@aminya aminya force-pushed the workspaceFolders branch from 6f03b0b to df054a0 Compare May 13, 2021 11:21
@aminya aminya force-pushed the workspaceFolders branch from df054a0 to 7c7fefd Compare May 13, 2021 11:27
@aminya aminya requested a review from UziTech May 13, 2021 11:33
lib/server-manager.ts Show resolved Hide resolved
test/helpers.ts Show resolved Hide resolved
test/helpers.ts Show resolved Hide resolved
@UziTech UziTech merged commit 236e2d1 into master May 13, 2021
@UziTech UziTech deleted the workspaceFolders branch May 13, 2021 17:45
@github-actions
Copy link

🎉 This PR is included in version 1.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@aminya
Copy link
Member Author

aminya commented May 14, 2021

Please do not squash the pull requests. I need to disable squash for this organization altogether so people don't do it by mistake

@UziTech
Copy link
Member

UziTech commented May 14, 2021

Why not? squashing the commits of a PR makes the release notes much cleaner and includes the PR# so anyone can still see each commit.

@aminya
Copy link
Member Author

aminya commented May 14, 2021

We should not sacrifice the version control for the sake of semantic release change log generation. If the issue is that, we should stop using automatically generated release notes.

Related to this:
atom/atom#22081

@UziTech
Copy link
Member

UziTech commented May 14, 2021

but because it is squashed there is no way to see what issue comes from which change

Not true, this PR will still exist with the commits. And it will be easier to find since it will be in the release notes.

people are used to assessing the life of a project based on the commits pushed to the master

That seems like an error on their part. Like judging software by number of lines of code or “measuring aircraft building progress by weight” -- Bill Gates


By the way, both of those arguments seem contrary to your arguments for combining dependency updates.

I would much rather have those issues than have to write release notes manually for every release 🤣.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants