What does the Meteor smart.lock file do? - meteor

What does the file smart.lock do for my meteor project? If I delete it from my project the app still works.

The smart.lock file is used by meteorite to handle your app's dependencies:
Meteorite writes to a smart.lock file in the app's root directory to
track the exact versions of its dependencies, even when it's set up in
a fresh environment.
From here. My original assumption about your problem was that you had no meteorite packages, which I was mistaken. Hubert points out in his comment that your project generally relies on smart.json and uses smart.lock as a cache (more info below), hence why the application continued to work on your own machine.

Related

Force Swift Package Manager to honour Package.resolved

I am trying to use Swift Package manager to update my dependencies locally to match those in the Package.resolved file.
For example, when I update my dependencies I run swift package update, which updates the Package.resolved file, which I then commit. When I pull this new commit on to a computer that has an existing .build directory with the old versions of the dependencies I would like to update the local versions to the one in Package.resolved.
I was expecting swift package resolve to do this, but instead it updates the Package.resolved according to the .build/dependencies-state.json.
The obvious solution is to delete the .build directory, but this means the dependencies are recompiled every time, which can be slow on CI.
I want the equivalent of bundle install, yarn install, or carthage boostrap. Is this possible?
This has been confirmed to be a bug, and I have opened a bug in the Swift JIRA.

Reinstall Active Meteor Project

Background
I suddenly started getting a Meteor error:
~/.meteor/packages/meteor-tool/.1.4.0-1.1b1o7uq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?`
After extensive searching, I came to the conclusion that there isn't a known, straight-forward solution to this problem.
Possible Solution
I created a new Meteor project and that works. This is because it is at the latest version of Meteor, and fibers.node is properly installed in the 1.6 (latest version) directory.
The best solution looks to be removing my live project directory and recreating it with the same name (at Meteor's latest version) and then retrieving all the packages, settings and files (HTML, JS, CSS)
Question
What is the best way to do this so that:
I preserve all the packages that I have installed (there are many)
I preserve all the custom settings that have changed from default
I am able to bring all my files (I am assuming this will be simple copy of *.html, *.css and *.js from the original project)
I was able to resolve the error:
~/.meteor/packages/meteor-tool/.1.4.0-1.1b1o7uq++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/fibers/bin/darwin-x64-v8-4.5/fibers.node is missing. Try reinstalling node-fibers?
so did not need to go down the reinstalling project path.
I followed the steps in the accepted answer on this thread:
How can I completely uninstall and then reinstall Meteor.js?
Specifically:
mv .meteor .meteor.bak
sudo rm /usr/local/bin/meteor
sudo chown -R $(whoami) ~/.npm/
curl https://install.meteor.com/ | sh
meteor --version -> This will pull the required package for the version your project is at.

How to Disable download missing package each time in meteor?

I tried to create meteor web application, but meteor download missing package each time when I change my code, and it was unnecessary.
So, can I config it only runs at the first time?
Thanks!
Could you add the actual message on the package it tries to download? Anyway, there are two potential locations where meteor looks for packages that need to be installed.
This is which each Meteor application and it's using Meteor Atmosphere packages. You can find these at .meteor folder in your project root file called packages path ./meteor/packages
Other potential place is packages.json in project root. It exists if you have used npm install or meteor npm install within the project.
Deleting unnecessary packages from these files should do the trick.

Meteor packages -- how does it work?

I downloaded a Meteor Starter project called MeteorAdmin.
In the root of its directory tree, you find a packages directory that contains few packages (boostrap, comments, few others) and also, in the .meteor directory there's a file called packages that defines the dependencies of this project.
What is the difference between them? What I found interesting is that .meteor/packages contains bootstrap as well. In theory shouldn't that be enough so that bootstrap would get downloaded to the project?
The meteor packages file simply lists all of the apps dependencies as well as the load order of each (top to bottom). You can edit this file if you know what you are doing, but it's probably better to leave it alone until you are more familiar with Meteor.
The way you add packages is by typing meteor add <package-name> in your terminal and then it will be added to your project. Additionally, the name of the package will be added to the bottom of your packages file.
A meteor app can have local packages that are defined in the packages folder of the root directory. This project likely is implementing it's own bootstrap package and then added it with the meteor command I listed above. Once a local package is added to your project with the meteor add command it's package name will appear in the packages file just like packages from Atmosphere. I hope that answers your question... Let me know if you were looking for something more specific.

Composer misses to install certain files (app/console, AutoLoader.php, app_dev.php, etc.)

I am developing a web application with Symfony 2. The code of my own bundle that forms the heart of my application and some configurations files for application-wide settings are controlled by Git (mostly the directories, src/MyCompany/MyBundle, app/Resources/config, etc.) The rest is under control of Composer (the framework, 3rd party bundles, etc.)
Up to now, I ran a ./composer self-update && ./composer.phar update once in a while, pushed or fetched source code from the origin of my repository and everything has been working well.
Today, I started a new fresh working directory and experienced some odd problems.
I performed
git clone <my git repo url> www
cd www
composer.phar install
The composer.json is part of my repository, hence it normally suffices to excute Composer in order to install the framework and all required bundles to get a fully working copy of my web application.
But today, composer.phar install stopped prematurely complainig about missing files. Luckily, I still had my old working directory, so I could copy over the missing files manually, and restart composer.phar. I had to repeat these steps several times until I ended with a fully working application.
The files that were missing are
app/console
AutoLoader.php
app_dev.php
AppCache.php
I thought that these files are part of the Symfony framework and expected them to be installed by Composer. Fot this reason they are not under control of my revision control system.
I found this related question. The answer is very generic und not particularly helpful. All it says is that for example app/console should be included into revision control, because it is not installed by Composer (any longer) and that there is a change in the directory structure due to the transition from Symfony 2 to 3. But I know for sure that app/console was installed by Composer in the past. Hence, something changed.
This leads me to the following questions
Is there any complete, up-to-date and official documentation
what should be included in the repository
what should be in .gitignore
what is managed by Composer?
Is there any documentation how to do the transistion from the old directory structure to the new one in preperation of Symfony 3?
I thought I read all README.md, all release information and everything in "Living on the Edge" of the Symfony site, but somehow I missed this.
The clean way to install Symfony2 from scratch with composer, is to use the following command:
composer create-project symfony/framework-standard-edition my_project_name
This will ensure that all basic structures are created. After that, you can still insert your customisations from the previous project.
Then you can add everything – except app/config/parameters.yml as well as the contents of vendor/, app/cache and app/logs – to your repository.
About transitioning to SF3, I guess there’ll be an upgrade path as soon as SF3 is stable enough to create such a document.
1.1. that depends how you want people to be able to fetch your bundle
1.2. I share with you my own .gitignore: beware I use git for my own use to have a security for my files, not to allow people to get my bundle:
# Cache and logs (Symfony2)
/app/cache/*
/app/logs/*
!app/cache/.gitkeep
!app/logs/.gitkeep
# Cache and logs (Symfony3)
/var/cache/*
/var/logs/*
!var/cache/.gitkeep
!var/logs/.gitkeep
# Parameters
/app/config/parameters.yml
/app/config/parameters.ini
# Managed by Composer
/app/bootstrap.php.cache
/var/bootstrap.php.cache
/bin/*
!bin/console
!bin/symfony_requirements
/vendor/
# Assets and user uploads
/web/bundles/
/web/uploads/
# PHPUnit
/app/phpunit.xml
/phpunit.xml
# Build data
/build/
# Composer PHAR
1.3. everything that is in composer.json

Resources