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

Make packages tree read-only #419

Closed
DartBot opened this issue Jun 5, 2015 · 6 comments
Closed

Make packages tree read-only #419

DartBot opened this issue Jun 5, 2015 · 6 comments
Assignees
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/8518285?v=3" align="left" width="96" height="96"hspace="10"> Issue by stevemessick
Originally opened as dart-lang/sdk#8101


Enhancement suggestion: Make editor prevent you from changing anything in the packages tree.

I had incorrectly set up a package I was trying to create, by storing my source code under a subfolder of the packages tree. This "got it to work", but was not the right way of doing it.

When I upgraded to the latest editor and loaded up my project, it (pub package-manager?) assassinated the source files I had created.

Luckily I had backups, so no damage done. The folks in the IRC channel suggested I report this feedback to help keep others from similarly "shooting themselves in the foot"

From: rk22a in IRC channel / richardk@leapbeyond.com
////////////////////////////////////////////////////////////////////////////////////
Editor: 0.3.1_r17463 (2013-01-23)
OS: Windows 7 - amd64 (6.1)
JVM: 1.6.0_21

projects: 1

open dart files: 2

auto-run pub: true
mem max/total/free: 889 / 580 / 459 MB
thread count: 24
analysis: 0 tasks, 35 libraries, 2 contexts
index: 80337 relationships and 0 attributes in 15398 elements in 148 resources stored in 2 MB on disk

SDK installed: true
Dartium installed: true

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/1269969?v=3" align="left" width="48" height="48"hspace="10"> Comment by devoncarew


I think a good way to implement this would be for the files to be read-only on disk. i.e. for pub to make them read-only during provisioning. That way there's no special casing needed by the editor, and other development tools (IntelliJ, Sublime, ...) will see the same behavior (and avoid the same issues).

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/2192312?v=3" align="left" width="48" height="48"hspace="10"> Comment by keertip


Good point! For now, we have a fix in the editor to open as read only

https://codereview.chromium.org/12194031/

r=18100

It would be great if pub marked the files as readonly when installing them in pub cache


Set owner to @munificent.
Removed this from the M4 milestone.
Removed Area-Editor label.
Added Area-Pub label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


Added this to the Later milestone.

@DartBot DartBot added type-enhancement A request for a change that isn't a bug closed-not-planned Closed as we don't intend to take action on the reported issue Priority-Medium labels Jun 5, 2015
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Marked this as being blocked by dart-lang/sdk#15078.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent


I don't think we intend to handle this in file system. Hopefully we can get rid of symlinks entirely and sidestep this issue.


Added NotPlanned label.

@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3


Issue #823 has been merged into this issue.

@DartBot DartBot closed this as completed Jun 5, 2015
sigurdm pushed a commit to sigurdm/pub that referenced this issue Nov 15, 2019
* Increase the severity of missing SDK constraint.

* dartfmt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-not-planned Closed as we don't intend to take action on the reported issue type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

2 participants