Local packages on Windows


#1

Hi folks,

In relation to: https://github.com/meteor/windows-preview/issues/1

I’m looking for a way to work with packages in a way that will work on both Windows and Unix-flavoured platforms. Here’s roughly the process I’m following, using iron:router as an example:

  1. mkdir -p vendor/packages
  2. cd vendor/packages
  3. git clone https://github.com/iron-meteor/iron-router.git iron:router
  4. meteor add iron:router
  5. (rinse, repeat for every package we’re using)
  6. PACKAGE_DIRS=/path/to/vendors/packages meteor

All well and good on the dear old Mac! But our team also works on Windows. Because the semi-colon is illegal in a filename on Windows, I have worked around the issue as follows:

  1. Clone everything as above, replacing ‘:’ with ‘-’
  2. Where required, add to each package’s Package.describe() with a name, e.g. ‘iron:router’, as described in the attached issue.

The bit that I don’t like, as you might have guessed, is that I’m effectively having to patch other peoples packages.

So I guess my questions are:

  • Is there another way that I’m missing?
  • Is there perhaps an improvement on the way for this? I was wondering whether perhaps the name parameter in Package.describe() could be a required parameter to aid cross-platform development.

Thought it might be useful to know why I’m trying to do this in the first place, so here goes:

  • My company requires we store all third party code internally for security
  • In CI, we want third party code to be utterly guaranteed to be the same, so it’s under our SCM along with everything else that we’ve written.
  • We’re interacting with a large C++ codebase which grew up in a Windows world, and so is very difficult to port to another OS, like Linux, (as desirable as that might be I might add!). Windows support is therefore a must.

Thanks for reading,

Joe


#2

I should also add, I’m happy to go around submitting pull requests adding name parameters to improve Windows support if that’s a helpful thing to do.


#3

The use of a “:” in a package directory is no longer how Meteor does this (for Windows compatibility).

For example, if you do a meteor create --package bob:mything, you will get a directory mything containing the bob:mything package. There will be no “:” in any file names.

Long story short, clone the packages into a “simple” folder and you’re good to go.


#4

Hi Rob,

I think you’ve missed that I need to do this for third party packages too, and it has to be both Unix and Windows compatible. I think you might have suggested the answer though which I should submit pull requests for those third party packages I want to use that don’t prescribe a name value in Package.describe().

Joe


#5

You know, I never noticed that the name was optional until you pointed it out! :smile: