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

Simplify onboarding (VSC-426) #159

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
ee5405c
initial auto window
brianignacio5 Aug 10, 2020
eacf16d
initial setup window
brianignacio5 Aug 14, 2020
2aaa643
add tools setup methods
brianignacio5 Aug 17, 2020
07c21d6
complete one click install
brianignacio5 Aug 18, 2020
9527603
open py esp-idf folders
brianignacio5 Aug 19, 2020
553ec0e
add prerequisites validation
brianignacio5 Aug 20, 2020
2cd8ffd
add codicons and custom page
brianignacio5 Aug 24, 2020
aa1c791
add initial custom setup page
brianignacio5 Aug 25, 2020
0403fb6
idf download setup
brianignacio5 Aug 27, 2020
65eab41
add esp-idf cancel logic
brianignacio5 Aug 28, 2020
3ab7eeb
improve custom ui alignment
brianignacio5 Aug 31, 2020
f8625fd
idfToolManager simplify check tools cancel dload
brianignacio5 Sep 1, 2020
d6087df
progress tools cancel py env install
brianignacio5 Sep 2, 2020
47eafd0
cancel pkg extract save custom settings
brianignacio5 Sep 3, 2020
e634b2a
fix manual path issues
brianignacio5 Sep 3, 2020
72832ef
test on win 1
brianignacio5 Sep 4, 2020
01564a8
rm duplicate python manual path
brianignacio5 Sep 8, 2020
9f606ce
1 click install status window
brianignacio5 Sep 9, 2020
9d4e9b9
update status page
brianignacio5 Sep 10, 2020
687cb59
check esp-idf container and path on install page
brianignacio5 Sep 11, 2020
ea1985e
finished status rm custom
brianignacio5 Sep 14, 2020
7c298a4
status ui update
brianignacio5 Sep 15, 2020
275de0c
fix esp-idf url links
brianignacio5 Sep 15, 2020
86995ba
check default values env vars
brianignacio5 Sep 16, 2020
6ba66d4
install py reqs command
brianignacio5 Sep 16, 2020
2eefff9
install py req cmd in schema
brianignacio5 Sep 16, 2020
9761065
fix error message on esp-idf python
brianignacio5 Sep 22, 2020
e533463
enhance download progress ui
brianignacio5 Sep 23, 2020
c991489
Add status step background
brianignacio5 Sep 23, 2020
e0ce0d0
improve start ui and errors
brianignacio5 Sep 24, 2020
85b992f
improve tools ui status page
brianignacio5 Sep 25, 2020
ff9fe68
add custom setup ui
brianignacio5 Sep 25, 2020
089010b
check settings on extension activate
brianignacio5 Oct 9, 2020
aa4b780
rm old onboarding
brianignacio5 Oct 9, 2020
b7a2cbe
show setup when missing pre requisites
brianignacio5 Oct 9, 2020
1258c0e
rm test lines
brianignacio5 Oct 14, 2020
5474a53
rm testing on checkExistingSetttings
brianignacio5 Oct 14, 2020
fd4da10
improve setup css align and colors
brianignacio5 Oct 15, 2020
08ca4db
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 19, 2020
6928bfc
fix select erroMsg css rm home btn statusPage
brianignacio5 Oct 21, 2020
89ee873
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 26, 2020
f8c3a64
reject execChildProcess only on Error
brianignacio5 Oct 26, 2020
5089f97
fix childProcess cancelToken
brianignacio5 Oct 27, 2020
44e77dc
fix icons on vsix
brianignacio5 Oct 27, 2020
76ca0e6
add resolve url loader fix font codicon
brianignacio5 Oct 28, 2020
5beadff
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Oct 29, 2020
88d8b1f
update yarn lock
brianignacio5 Oct 29, 2020
ec3153c
resolve url loader
brianignacio5 Oct 29, 2020
a8f8222
fix python list linux
brianignacio5 Oct 30, 2020
78b8be0
add font face to setup webview
brianignacio5 Nov 9, 2020
805daeb
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Nov 9, 2020
4051b53
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Nov 23, 2020
6315fcb
update codicon icons ensure idfContainer dir
brianignacio5 Nov 24, 2020
b6a3caa
fix path sep add def idfPath
brianignacio5 Nov 26, 2020
8dc2039
empty default manual idf path
brianignacio5 Nov 26, 2020
b9c6d5e
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 1, 2020
5999f34
log download error
brianignacio5 Dec 1, 2020
b60bbeb
initialize versions currentSetupValid
brianignacio5 Dec 2, 2020
33150dd
set percentage on idf and tools installed status
brianignacio5 Dec 3, 2020
c6e5a98
update setup docs
brianignacio5 Dec 4, 2020
df84c02
refactor setup panel highlight tools folder
brianignacio5 Dec 4, 2020
c0004fd
update doc paths
brianignacio5 Dec 4, 2020
94efca9
rm timeout test setup spaces
brianignacio5 Dec 8, 2020
c2ea4c1
fix python path with spaces
brianignacio5 Dec 8, 2020
756fdda
Merge branch 'feature/simple-onboarding' of github.com:brianignacio5/…
brianignacio5 Dec 8, 2020
ee7739d
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 8, 2020
eb579df
add fallback on env idf_path idf_tools_path
brianignacio5 Dec 11, 2020
ff7cb7b
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Dec 30, 2020
48e507e
Merge branch 'master' into feature/simple-onboarding
brianignacio5 Jan 4, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
rm timeout test setup spaces
  • Loading branch information
brianignacio5 committed Dec 8, 2020
commit 94efca93632ac2ee2cd5eddfa935dd3aca77509e
1 change: 0 additions & 1 deletion src/downloadManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export class DownloadManager {
host: parsedUrl.host,
path: parsedUrl.pathname,
rejectUnauthorized: proxyStrictSSL,
timeout: 3000,
};

return new Promise<http.IncomingMessage>((resolve, reject) => {
Expand Down
44 changes: 18 additions & 26 deletions src/pythonManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,13 @@ export async function installPythonEnv(
channel?: OutputChannel,
cancelToken?: CancellationToken
) {
const pyPathWithoutSpaces = pythonBinPath.replace(/(\s+)/g, "\\$1");
const isInsideVirtualEnv = await utils.execChildProcess(
`${pyPathWithoutSpaces} -c "import sys; print(hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))"`,
`"${pythonBinPath}" -c "import sys; print(hasattr(sys, 'real_prefix') or (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix))"`,
idfToolsDir,
channel
);
if (isInsideVirtualEnv.replace(EOL, "") === "True") {
const inVenvMsg = `Using existing virtual environment ${pyPathWithoutSpaces}. Installing Python requirements...`;
const inVenvMsg = `Using existing virtual environment ${pythonBinPath}. Installing Python requirements...`;
pyTracker.Log = inVenvMsg;
if (channel) {
channel.appendLine(inVenvMsg);
Expand All @@ -50,9 +49,7 @@ export async function installPythonEnv(
process.platform === "win32"
? ["Scripts", "python.exe"]
: ["bin", "python"];
const virtualEnvPython = path
.join(pyEnvPath, ...pyDir)
.replace(/(\s+)/g, "\\$1");
const virtualEnvPython = path.join(pyEnvPath, ...pyDir);

const creatEnvMsg = `Creating a new Python environment in ${pyEnvPath} ...\n`;

Expand Down Expand Up @@ -90,7 +87,7 @@ export async function installPythonEnv(
pythonVersion.localeCompare("3.3") !== -1 ? "venv" : "virtualenv";
if (envModule.indexOf("virtualenv") !== -1) {
const checkVirtualEnv = await utils.execChildProcess(
`${pyPathWithoutSpaces} -c "import virtualenv"`,
`"${pythonBinPath}" -c "import virtualenv"`,
idfToolsDir,
channel,
undefined,
Expand All @@ -100,7 +97,7 @@ export async function installPythonEnv(
} catch (error) {
if (error && error.message.indexOf("ModuleNotFoundError") !== -1) {
await execProcessWithLog(
`"${pyPathWithoutSpaces}" -m pip install --user virtualenv`,
`"${pythonBinPath}" -m pip install --user virtualenv`,
idfToolsDir,
pyTracker,
channel,
Expand All @@ -110,7 +107,7 @@ export async function installPythonEnv(
}
}
await execProcessWithLog(
`${pyPathWithoutSpaces} -m ${envModule} ${pyEnvPath}`,
`"${pythonBinPath}" -m ${envModule} "${pyEnvPath}"`,
idfToolsDir,
pyTracker,
channel,
Expand Down Expand Up @@ -148,9 +145,7 @@ export async function installReqs(
undefined,
cancelToken
);
const requirements = path
.join(espDir, "requirements.txt")
.replace(/(\s+)/g, "\\$1");
const requirements = path.join(espDir, "requirements.txt");
const reqDoesNotExists = " doesn't exist. Make sure the path is correct.";
if (!utils.canAccessFile(requirements, constants.R_OK)) {
Logger.warnNotify(requirements + reqDoesNotExists);
Expand Down Expand Up @@ -185,23 +180,22 @@ export async function installExtensionPyReqs(
cancelToken?: CancellationToken
) {
const reqDoesNotExists = " doesn't exist. Make sure the path is correct.";
const debugAdapterRequirements = path
.join(
utils.extensionContext.extensionPath,
"esp_debug_adapter",
"requirements.txt"
)
.replace(/(\s+)/g, "\\$1");
const debugAdapterRequirements = path.join(
utils.extensionContext.extensionPath,
"esp_debug_adapter",
"requirements.txt"
);
if (!utils.canAccessFile(debugAdapterRequirements, constants.R_OK)) {
Logger.warnNotify(debugAdapterRequirements + reqDoesNotExists);
if (channel) {
channel.appendLine(debugAdapterRequirements + reqDoesNotExists);
}
return;
}
const extensionRequirements = path
.join(utils.extensionContext.extensionPath, "requirements.txt")
.replace(/(\s+)/g, "\\$1");
const extensionRequirements = path.join(
utils.extensionContext.extensionPath,
"requirements.txt"
);
if (!utils.canAccessFile(extensionRequirements, constants.R_OK)) {
Logger.warnNotify(extensionRequirements + reqDoesNotExists);
if (channel) {
Expand Down Expand Up @@ -283,10 +277,9 @@ export async function getPythonEnvPath(
}

export async function checkPythonExists(pythonBin: string, workingDir: string) {
const pyPathWithoutSpaces = pythonBin.replace(/(\s+)/g, "\\$1");
try {
const versionResult = await utils.execChildProcess(
`${pyPathWithoutSpaces} --version`,
`"${pythonBin}" --version`,
workingDir
);
if (versionResult) {
Expand All @@ -312,10 +305,9 @@ export async function checkPythonExists(pythonBin: string, workingDir: string) {
}

export async function checkPipExists(pyBinPath: string, workingDir: string) {
const pyPathWithoutSpaces = pyBinPath.replace(/(\s+)/g, "\\$1");
try {
const pipResult = await utils.execChildProcess(
`${pyPathWithoutSpaces} -m pip --version`,
`"${pyBinPath}" -m pip --version`,
workingDir
);
if (pipResult) {
Expand Down