Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Store configuration options for multiple kernels #474

Merged

Conversation

KrzysztofSikoraCodete
Copy link
Contributor

Related with issue:
#471

Summary:

Added editor finder to console and file handler

@KrzysztofSikoraCodete
Copy link
Contributor Author

Peek 2020-06-18 12-15

@KrzysztofSikoraCodete
Copy link
Contributor Author

@jtpio @afshin
I've separated out the hash methods.
Now the structure seems more sensible and tests are passing.

@KrzysztofSikoraCodete
Copy link
Contributor Author

I found some issue after initialization parameters-mixer plugin, although tests passed

@KrzysztofSikoraCodete
Copy link
Contributor Author

Solved

@KrzysztofSikoraCodete
Copy link
Contributor Author

Solved #467 also on this PR

Copy link
Member

@afshin afshin left a comment

Choose a reason for hiding this comment

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

We should do a follow-on PR where the hash also is associated with a kernel name.

@KrzysztofSikoraCodete
Copy link
Contributor Author

We should do a follow-on PR where the hash also is associated with a kernel name.

I've added kernel name as third param.

}

private _hashMethod: (code: string) => string;
private _tmpFileAssociatedWithKernel = new Map<string, [string, string]>();
Copy link
Member

Choose a reason for hiding this comment

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

Maybe there could be an interface instead of [string, string]?

So it's easier to follow what they refer to.

Comment on lines 95 to 100
setHashParameters(method: string, seed: number, kernelName: string): void;
setTmpFileParameters(
prefix: string,
suffix: string,
kernelName: string
): void;
Copy link
Member

Choose a reason for hiding this comment

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

We probably want to pass an object with the method, seed and kernelName properties instead of multiple arguments to the function, so it's easier to extend later if needed.

@afshin
Copy link
Member

afshin commented Jul 8, 2020 via email

@jtpio
Copy link
Member

jtpio commented Jul 8, 2020

We should now be able to rebase the PR to fix the tests.

I'll give the PR a quick test locally too.

Comment on lines 103 to 104
focus: boolean,
kernelName: string
Copy link
Member

Choose a reason for hiding this comment

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

Similar comment as above. These findIn* methods used to have 2 arguments only, but now that they are growing we might want to refactor that into an object too.

import { murmur2 } from 'murmurhash-js';

/**
* A class to hash code.
Copy link
Member

Choose a reason for hiding this comment

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

How about something more specific?

Suggested change
* A class to hash code.
* A class that holds debugger configuration for a kernel.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It makes sense

@jtpio
Copy link
Member

jtpio commented Jul 9, 2020

Just tried locally and it looks good, thanks @KrzysztofSikoraCodete 👍

Having the debug config (hash functions and parameters) specific to a kernel indeed makes sense.

I'll be pushing an update to this.

@afshin looks like we should be able to merge this PR in once rebased and updated, so it can be included in the next release.

@KrzysztofSikoraCodete
Copy link
Contributor Author

Nice to hear that. I'll open new PR after merge this one, then i'll improve about what in the above remarks.

@jtpio
Copy link
Member

jtpio commented Jul 9, 2020

I'll open new PR after merge this one, then i'll improve about what in the above remarks

I thought we could do it in the same PR here?

@KrzysztofSikoraCodete
Copy link
Contributor Author

I thought we could do it in the same PR here.

Right, so i'll do here

@afshin afshin force-pushed the extra-breakpoints-console branch from 1de49e7 to 1681f75 Compare July 10, 2020 02:30
@afshin afshin force-pushed the extra-breakpoints-console branch from ad5c76a to be605a0 Compare July 10, 2020 03:06
@afshin afshin force-pushed the extra-breakpoints-console branch from e1909f9 to d5fff95 Compare July 10, 2020 10:35
@KrzysztofSikoraCodete
Copy link
Contributor Author

Excellent idea. Thanks @afshin for refactor and cleaning

@afshin afshin changed the title Editor handler for console and file debug Store configuration options for multiple kernels Jul 10, 2020
…lgorithms and remove superfluous dispose method
@afshin afshin force-pushed the extra-breakpoints-console branch from a5b33db to b618d35 Compare July 10, 2020 15:38
@afshin afshin force-pushed the extra-breakpoints-console branch from 15e19f5 to 8937201 Compare July 10, 2020 15:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants