-
Notifications
You must be signed in to change notification settings - Fork 75
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
Support customization process part 1 #1960
Conversation
@@ -0,0 +1,93 @@ | |||
// Copyright (c) Microsoft Corporation. | |||
// Licensed under the MIT license. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mainly test to generate in sources/generated/src folder if exists this sources folder
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, just some minor comments.
let sourcesRoot = join(projectRoot, "src"); | ||
const customizationFolder = join(projectRoot, "sources"); | ||
if (await fsextra.pathExists(customizationFolder)) { | ||
sourcesRoot = join(customizationFolder, "generated", "src"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we decided to use sources/generated/src
folder?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the way of current openai implementation and customization tool supported. Personally I think sources/generated
and sources/generated/src
would work me. The latter one could give us more flexibility if in future we'd like to add more metadata or testing files in sources folder.
rootDir: string; | ||
rlcSourcesDir: string; | ||
modularSourcesDir?: string; | ||
metadataDir: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is rootDIr not equals to metadataDir ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally rootDir and metadataDir are the same, I proposed a new option because I will use rootDir to calculate if this is in sdk repo and I think using metadata one would be wired.
const options: RLCOptions = transformRLCOptions(emitterOptions, dpgContext); | ||
dpgContext.rlcOptions = options; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const options: RLCOptions = transformRLCOptions(emitterOptions, dpgContext); | |
dpgContext.rlcOptions = options; | |
dpgContext.rlcOptions = transformRLCOptions(emitterOptions, dpgContext); |
Is this not working ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized options is being used somewhere else ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if there's any place that will modify the options causing them to be inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer to refactor this code in my next pr.
This is part of the pr - #1958
[Part 1] In this pr we would
[Part 2] Below would be covered in my next pr: