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

Pkg sometimes removes [targets] #876

Closed
fredrikekre opened this issue Nov 2, 2018 · 0 comments · Fixed by #985
Closed

Pkg sometimes removes [targets] #876

fredrikekre opened this issue Nov 2, 2018 · 0 comments · Fixed by #985
Labels

Comments

@fredrikekre
Copy link
Member

Sometimes the

[targets]
test = ["Test"]

section is removed from the Project.toml file. I have not been able to understand why, and I have always thought that "Well, I guess I accidentally removed it then...", but it keeps happening and it has driven me crazy! I HAVE NOT REMOVED IT!!

I have finally found a way to reproduce it:

  1. Start with a clean clone of Pkg or git clean -fdx notably to remove the Manifest.toml file.
  2. Remove the uuid = section in Pkg
  3. Run julia --project in the Pkg directory
  4. Run using Pkg (this seems to be important ...)
  5. pkg> add Example
  6. pkg> rm Example

and then you have the following diff for the Project.toml file:

diff --git a/Project.toml b/Project.toml
index ed4c5a3..006b005 100644
--- a/Project.toml
+++ b/Project.toml
@@ -16,6 +16,3 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
 
 [extras]
 Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
-
-[targets]
-test = ["Test"]
@fredrikekre fredrikekre added the bug label Nov 2, 2018
bors bot added a commit that referenced this issue Jan 14, 2019
985: fix rm: `project.extras` also contains dependency names r=00vareladavid a=00vareladavid

fixes #876 

Thanks @fredrikekre for getting it down to a minimal repro.

Co-authored-by: David Varela <00.varela.david@gmail.com>
@bors bors bot closed this as completed in #985 Jan 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant