Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Fix make dev-install #2372

Merged
merged 2 commits into from
May 6, 2020
Merged

Fix make dev-install #2372

merged 2 commits into from
May 6, 2020

Conversation

liuzhe-lz
Copy link
Contributor

No description provided.

@liuzhe-lz liuzhe-lz requested a review from SparkSnail April 24, 2020 09:15
@@ -5593,7 +5593,7 @@ load-json-file@^4.0.0:
pify "^3.0.0"
strip-bom "^3.0.0"

loader-fs-cache@>=1.0.3, loader-fs-cache@^1.0.0:
loader-fs-cache@^1.0.0:
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 line was automatically modified on make.

@liuzhe-lz liuzhe-lz requested a review from squirrelsc April 24, 2020 09:36
@@ -205,14 +205,14 @@ install-node-modules:
.PHONY: dev-install-node-modules
dev-install-node-modules:
#$(_INFO) Installing NNI Package $(_END)
rm -rf $(NNI_PKG_FOLDER)
Copy link
Member

Choose a reason for hiding this comment

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

It may need to test what if make install and then make dev-install.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You should never do that. Remove NNI first before switching to another installation setup.
We don't want to investigate what will happen if pip is requested to overwrite a normal package with an egg package.

Copy link
Member

Choose a reason for hiding this comment

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

Suggest to keep this line. Don't rely on human to do right things, and the normal install also have this line.

Copy link
Contributor Author

@liuzhe-lz liuzhe-lz Apr 28, 2020

Choose a reason for hiding this comment

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

I don't agree. Removing this folder does NOT uninstall NNI from user's system, instead it leads to an ambiguous "partially installed and partially removed" state.
If a developer do something wrong, I prefer to fail early.

Copy link
Member

Choose a reason for hiding this comment

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

Any ambiguous state should be fixed in the Makefile. This change makes dev/normal installs script inconsistent, and dig an unnecessary pit. Anyway, if you still prefer, go ahead merge it.

Copy link
Contributor Author

@liuzhe-lz liuzhe-lz Apr 29, 2020

Choose a reason for hiding this comment

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

If you make install twice, it will be okay both with or without this folder, since pip and yarn are allowed to run multiple times with same options. Maybe this folder is removed in case the last bulid was corrupted.
But if someone make install then make dev-install, I don't know what will happen. Because the options feeded to pip are changed, and it's somewhat difficult to figure out pip's exact behaviour in such scenario.
If we want to ensure a clean install, we should trigger clean and uninstall targets instead of removing one or two folders. But as far as I know this is not the common practice of Makefile.
We can take a minute to discuss this issue on next scrum before merging it.

@QuanluZhang
Copy link
Contributor

@liuzhe-lz please solve conflict

@SparkSnail SparkSnail mentioned this pull request Apr 26, 2020
15 tasks
@liuzhe-lz liuzhe-lz linked an issue Apr 26, 2020 that may be closed by this pull request
@liuzhe-lz liuzhe-lz merged commit 140eb68 into microsoft:master May 6, 2020
@liuzhe-lz liuzhe-lz deleted the fix-dev-install branch May 19, 2020 11:20
@SparkSnail SparkSnail mentioned this pull request May 19, 2020
15 tasks
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.

Dev install does not work
4 participants