Skip to content

Improve support for additional load-paths - #429

Closed
emallson wants to merge 5 commits into
pixie-lang:masterfrom
emallson:load-paths
Closed

emallson wants to merge 5 commits into
pixie-lang:masterfrom
emallson:load-paths

Conversation

@emallson

@emallson emallson commented Nov 3, 2015

Copy link
Copy Markdown

This PR was motivated by me wanting to create an AUR package for pixie, but being blocked by the hard-coded load-paths.

This PR contributes the following changes:

  • load-paths are now added from the PIXIE_PATH environment variable when pixie-vm is run
  • A single load path is added during build. This is intended for use by packagers to allow the standard library to be installed to a system directory such as /usr/share/pixie
  • A make install target that more-or-less conforms to the variable conventions.

The order of the load-paths is [user path (-l), pixie-vm directory, PIXIE_PATH, system path].

Note that the pixie-vm path seems weird when doing a system install, because /usr/bin and a bunch of directories related to it end up in load-paths.

@heyLu

heyLu commented Nov 15, 2015

Copy link
Copy Markdown
Member

Sorry for the late response...

While we need to support installing pixie separate from its libraries, I think we should do it "cleaner".

I'd prefer switching between the current path local to pixie-vm and a "system" path at build time. Either one or the other, but not both, because the current load path is confusing enough as it is.

Something like:

if USE_GLOBAL_LOADPATH:
  system_path = ... # from LIB_PATH or similar
else:
  system_path = ... # local to `pixie-vm`

@emallson

Copy link
Copy Markdown
Author

Sorry for the also-late response :P

Understood. I'm going to close* this PR and use that approach. My reasoning for doing it this (messy) way was to preserve as much existing behavior as possible.

I should have a followup PR up this weekend.

*Closing because I don't see much point in having a big revert commit or overwriting that branch. Lemme know if you'd rather keep this centralized on this PR

@emallson emallson closed this Nov 20, 2015
@heyLu heyLu mentioned this pull request Dec 4, 2015
1 of 3 tasks
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.

2 participants