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

Delete folder in Editor deleting package contents #5583

Closed
DartBot opened this issue Oct 1, 2012 · 19 comments
Closed

Delete folder in Editor deleting package contents #5583

DartBot opened this issue Oct 1, 2012 · 19 comments
Assignees
Labels
os-windows P1 A high priority bug; for example, a single project is unusable or has many test failures
Milestone

Comments

@DartBot
Copy link

DartBot commented Oct 1, 2012

This issue was originally filed by pruj...@gmail.com


Win7, 64
build 12784

What I did:

  1. After a pub install, I attempted to delete a folder in the Editor.
  2. The editor hung during the deletion process.
  3. After 15 minutes, I force-closed the editor.

All of my root project files had were DELETED(recovered with git reset).

  1. Tried pub install from command line and from Dart Editor. Both same result: Only folders of repos are copied into packages, not files.
  2. I then deleted pubspec.lock and .pub_cache. The source project files are linked correctly in packages. Warns on unittest ("does not have lib"), but does not link unittest/ into packages.
  3. pub install says dependencies installed, but still only copies folders (.pub_cache oddly not regenerated).
  4. deleted project folder. rebooted. re-pulled project clean. pub install. Same result, folders only (except root project files, which are linked).

I'm stuck. Time for Skyrim.

pubspec.yaml for reference:

name: buckshot
description: >
  Buckshot is a UI Framework for modern web applications. It attempts to model
  the best of .net WPF (Silverlight) and Adobe Flex, but without the need for a
  plug-in. Buckshot renders all output in HTML5/CSS3, and makes use of features
  available in today's modern web browsers. If you've worked with .net WPF or
  Silverlight then this framework will feel very familiar to you.
version: 0.0.2-alpha
author: John Evans <prujohn@gmail.com>
homepage: http://www.buckshotui.org
dependencies:
  xml:
    git: git://github.com/prujohn/dart-xml.git
  dartnet_event_model:
    git: git://github.com/prujohn/DartNet-Event-Model.git
  dart_utils:
    git: git://github.com/prujohn/dart_utils.git
  unittest:
    sdk: unittest

@DartBot
Copy link
Author

DartBot commented Oct 1, 2012

This comment was originally written by prujo...@gmail.com


It's like there's a bad cache somewhere, but I can't find it. Any ideas? I thought it was supposed to be in my user profile (.pub_cache) I can't seem to find it anywhere else.

@DartBot
Copy link
Author

DartBot commented Oct 1, 2012

This comment was originally written by pruj...@gmail.com


For example. I was able to recover a few of the packages by redirecting pubspec.yaml dependencies to pub.dartlang.org, but the one I don't have published there is still not updating.

@DartBot
Copy link
Author

DartBot commented Oct 1, 2012

This comment was originally written by prujoh...@gmail.com


fixed. I was able to find the cache (location changed I guess) using a symlink extension.

@munificent
Copy link
Member

Crap, yes, sorry. The location of the system cache changed. That was a result of fixing that "null" directory bug. It now puts the system cache in a Windows-friendly location: AppData/Roaming/Pub/Cache.

cc-ing Keerti since this may be an issue with how the Editor deletes directories.

I'll try to repro and see what I can figure out. I'm really sorry for the trouble here, especially the file deletion (!). That's definitely not something we want pub or the editor to do.


cc @keertip.
Set owner to @munificent.
Added this to the M1 milestone.
Removed Priority-Medium label.
Added Priority-High, Area-Pub, Accepted labels.

@DartBot
Copy link
Author

DartBot commented Oct 1, 2012

This comment was originally written by prujoh...@gmail.com


No problem guys, I knew that cache had to be somewhere! :)

Hey do I need to open a new bug on the folder deletion piece? Also the editor can get hung up when moving folders (that have packages/) sometimes.

@keertip
Copy link
Contributor

keertip commented Oct 1, 2012

@john, If you can reproduce the editor hang on close/delete/move folders, do open an issue for editor with steps to repro and we will look into it.

@DartBot
Copy link
Author

DartBot commented Oct 1, 2012

This comment was originally written by prujohn...@gmail.com


Well it's intermittent. Sometimes it works (when I cross my fingers and squint hard enough). Sometimes in hangs the editor indefinitely, with the working dialog still displayed. Again this is only when operating on folders that have a /packages replica.

@munificent
Copy link
Member

Hey do I need to open a new bug on the folder deletion piece?

No, I'll consider this bug to be about that, thanks.

@munificent
Copy link
Member

Hey, John. What's the status of this? I think I got confused on this thread. Is the only remaining issue here that the Editor hangs on deleting a folder?

@DartBot
Copy link
Author

DartBot commented Oct 6, 2012

This comment was originally written by pru...@gmail.com


Correct. Folder deletion.

@munificent
Copy link
Member

OK, sorry for the confusion. Changing this to be an editor bug then.


Set owner to @keertip.
Removed this from the M1 milestone.
Removed Area-Pub label.
Added Area-Editor, Triaged labels.

@keertip
Copy link
Contributor

keertip commented Oct 8, 2012

Added this to the M2 milestone.

@keertip
Copy link
Contributor

keertip commented Oct 15, 2012

@john,

Are you still having issues with folder deletion in editor? Any steps to help repro would be helpful.

@DartBot
Copy link
Author

DartBot commented Oct 15, 2012

This comment was originally written by prujoh...@gmail.com


I was going to wait until the next weekly comes out and then try again. Will update then.

@DartBot
Copy link
Author

DartBot commented Oct 16, 2012

This comment was originally written by @bp74


The problem is not fixed on Windows 7. I just deleted a folder in my project which contained a "packages" folder, now all files in all "packages" folders are gone. The only way to fix it, is deleting the "Pub/Cache/git" folder and run "pub install" again.

Windows 7 64 bit, Dart Editor Build 13679

@munificent
Copy link
Member

I just deleted a folder in my project which contained a "packages" folder, now all files in all "packages" folders are gone.

How did you delete the folder? Using Windows Explorer? The Editor? Command line?

@DartBot
Copy link
Author

DartBot commented Oct 16, 2012

This comment was originally written by @bp74


I used the Dart Editor to delete the folder.

@DartBot
Copy link
Author

DartBot commented Oct 16, 2012

This comment was originally written by @bp74


Maybe i should add that only the files were gone, all the folders inside of the package were still there.

@munificent
Copy link
Member

I think this is likely an editor issue, then. I did notice that src/com/google/dart/tools/core/utilities/io/FileUtilities.java looks like it's doing a naive recursive delete that will walk into symlinks. I don't know if that's the issue or not, though.

@DartBot DartBot added Type-Defect P1 A high priority bug; for example, a single project is unusable or has many test failures os-windows labels Oct 16, 2012
@DartBot DartBot added this to the M3 milestone Oct 16, 2012
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os-windows P1 A high priority bug; for example, a single project is unusable or has many test failures
Projects
None yet
Development

No branches or pull requests

3 participants