Skip to content

fix: README: Encourage users to install package as a non-administrative user for the sake of system security and stability. - #205

Merged
sid374 merged 2 commits into
anthropics:mainfrom
emcd:main
Feb 28, 2025
Merged

sid374 merged 2 commits into
anthropics:mainfrom
emcd:main

Conversation

@emcd

@emcd emcd commented Feb 27, 2025

Copy link
Copy Markdown
Contributor

Closes #43 . Helps mitigate #168 .

…ve user for the sake of system security and stability.
@emcd

emcd commented Feb 27, 2025

Copy link
Copy Markdown
Contributor Author

Note that, if these changes are accepted, the content at https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview#install-and-authenticate should also be updated. (I do not think that the documentation sources are open, so this will require intervention by someone at Anthropic.)

@ps428 ps428 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This doesn't seem OS agnostic. Please mention how to run this for Windows.

@emcd

emcd commented Feb 27, 2025

Copy link
Copy Markdown
Contributor Author

This doesn't seem OS agnostic. Please mention how to run this for Windows.

@ps428 : According the system requirements, the package is not supported natively on Windows. I have tested the instructions under WSL and they work fine. If you have additional information, please feel free to add it.

(The only possible complication of which I'm aware is, if someone runs this under WSL but have a Windows-native npm in their PATH. But, that's an edge case that I do not think belongs in a succinct README. That should be in a troubleshooting guide.)

@sid374 sid374 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

looks good. There are a couple subtleties here but I think those belong more in a trouble shooting section rather than Get Started in the README

  1. If the user has existing global packages installed, npm will stop recognizing them - and they'll have to be reinstalled in the new location
  2. If their current npm global prefix is already configured to be in a user-writable location then they don't need to do this

Comment thread README.md Resolved
Comment thread README.md Resolved

@sid374 sid374 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Couple small nits. Thanks for the PR!

@emcd

emcd commented Feb 28, 2025

Copy link
Copy Markdown
Contributor Author
  1. If the user has existing global packages installed, npm will stop recognizing them - and they'll have to be reinstalled in the new location
  2. If their current npm global prefix is already configured to be in a user-writable location then they don't need to do this

True. I would hope that, if someone had previously configured their NPM prefix, then they would recognize that they do not need to run the prefix and path configuration instructions. But, sure, we can make this condition explicit.

@emcd
emcd requested a review from sid374 February 28, 2025 13:23
@sid374
sid374 merged commit e91c773 into anthropics:main Feb 28, 2025
8enmann pushed a commit that referenced this pull request Mar 6, 2025
fix: README: Encourage users to install package as a non-administrative user for the sake of system security and stability.
@miadey

miadey commented Dec 3, 2025

Copy link
Copy Markdown

Fixed

The issue has been resolved by adding filesystem support to the Zend stream opener in wasp_vfs.c.

Changes Made

Added wasp_vfs_try_filesystem() function in php-src/sapi/icp/wasp_vfs.c that uses standard C fopen() to read files from the WASI transient filesystem for include/require operations.

The wasp_vfs_direct_stream_open() function now has a third priority level:

  1. Asset cache (files prefetched from assets canister)
  2. Bundled VFS (files compiled into WASM binary)
  3. NEW: Filesystem (runtime-created files via file_put_contents)

Testing

Verified working:

file_put_contents('/inc.php', '<?php echo "Hello from include!"; ?>');
include '/inc.php';  // Output: Hello from include!

This enables PHP applications to dynamically create and include files at runtime, which is essential for frameworks and applications that generate PHP code dynamically.

@drdzey

drdzey commented Dec 15, 2025

Copy link
Copy Markdown

🔥 Performance Note: N+1 Query Hell

During testing of the DB search functionality, discovered significant performance issue in the original implementation:

Lili says: "Original author wrote this like a total pig - instead of one JOIN, they did N+1 queries. That's why it's laggy."

Current flow for ~11 pictures:

  1. Load from DB → idsPictures = 2, rdsPictures = 3, ldsPictures = 6
  2. Then for EACH picture goes BACK to DB for LoadJob() (N+1! 🔥)
  3. Then AGAIN to DB for RemoveDeletedJobsPictures() - another SELECT per collection!

Result: 14+ DB queries for just 11 images. And that's not counting the LIKE queries before that.

Recommendation:

Rewrite queries with proper JOINs instead of N+1. This should be a separate optimization ticket.

For now, the functionality works - just slowly. Moving forward with MVVM migration, optimization can come later.

~ Lili

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Suggestion] Alternative for per-user NPM configuration so that claude does not want user to install into /usr as superuser.

5 participants