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

[Toolchain] Revisit ToolchainProvider class #717

Merged

Conversation

YongseopKim
Copy link
Contributor

@YongseopKim YongseopKim commented May 26, 2022

This commit revisits ToolchainProver class in src/Toolchain.

@YongseopKim YongseopKim added DRAFT Something like playground NO MERGE labels May 26, 2022
@YongseopKim YongseopKim requested a review from jyoungyun May 26, 2022 05:41
@YongseopKim YongseopKim force-pushed the draft/refactor_ToolchainProvider branch from 3585cf1 to 5a3a6ad Compare July 5, 2022 09:05
@YongseopKim YongseopKim changed the title [Draft] Refactor toolchain provider [Toolchain] Revisit ToolchainProver class Jul 5, 2022
@YongseopKim YongseopKim removed DRAFT Something like playground NO MERGE labels Jul 5, 2022
@YongseopKim YongseopKim marked this pull request as ready for review July 5, 2022 09:06
@YongseopKim
Copy link
Contributor Author

The points

  • ToolchainProvider can be used as TreeDataProvider as possible
  • To do it, let's introduce Node classes(BaseNode <- BackendNode or ToolchainNode)
  • BackendNode is an expression for Backend {} in ToolchainView
  • ToolchainNode is an expression for Toolchain o in ToolchainView
  • Let's introduce NodeBuilder btw Node and Provider

@YongseopKim
Copy link
Contributor Author

PTAL @jyoungyun

assert.deepStrictEqual(value, backend);
}
});
});

teardown(function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part can be separated pr.

Copy link
Contributor Author

Choose a reason for hiding this comment

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


// TODO: Move this to MockCompiler.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@@ -17,88 +17,105 @@
import * as vscode from 'vscode';

import {Toolchain} from '../Backend/Toolchain';
import {DebianToolchain} from '../Backend/ToolchainImpl/DebianToolchain';
import {Job, JobCallback} from '../Project/Job';
import {Job} from '../Project/Job';
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's better to read this file as one file not diff.

import {BackendNode, BaseNode, NodeBuilder, ToolchainNode, ToolchainProvider} from '../../Toolchain/ToolchainProvider';


// TODO: Move this to MockCompiler.ts
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@YongseopKim YongseopKim requested a review from a team July 6, 2022 02:33
jyoungyun
jyoungyun previously approved these changes Jul 6, 2022
Copy link
Collaborator

@jyoungyun jyoungyun left a comment

Choose a reason for hiding this comment

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

LGTM

@YongseopKim YongseopKim requested a review from a team July 6, 2022 23:54
@YongseopKim
Copy link
Contributor Author

PTAL @Samsung/one-vscode

@YongseopKim
Copy link
Contributor Author

Rebased. PTAL @jyoungyun and @Samsung/one-vscode

jyoungyun
jyoungyun previously approved these changes Jul 8, 2022
Copy link
Collaborator

@jyoungyun jyoungyun left a comment

Choose a reason for hiding this comment

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

LGTM

This commit revisits ToolchainProver class in src/Toolchain.

ONE-vscode-DCO-1.0-Signed-off-by: Yongseop Kim <[email protected]>
@YongseopKim
Copy link
Contributor Author

Rebased again... PTAL @jyoungyun and @Samsung/one-vscode

@YongseopKim YongseopKim requested review from a team July 8, 2022 07:51
Copy link
Collaborator

@jyoungyun jyoungyun left a comment

Choose a reason for hiding this comment

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

LGTM

Please review this PR. /cc @Samsung/one-vscode

@jyoungyun
Copy link
Collaborator

/cc @YongseopKim PR title has typo. ToolchainProver => ToolchainProvider

@YongseopKim YongseopKim changed the title [Toolchain] Revisit ToolchainProver class [Toolchain] Revisit ToolchainProvider class Jul 11, 2022
Copy link
Contributor

@llFreetimell llFreetimell left a comment

Choose a reason for hiding this comment

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

LGTM

@llFreetimell llFreetimell merged commit 28bd411 into Samsung:main Jul 11, 2022
@YongseopKim YongseopKim deleted the draft/refactor_ToolchainProvider branch July 11, 2022 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants