Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Changing the way plugins provide web assets
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  7 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Fabian Lange  
View profile  
 More options Jul 3 2008, 2:19 am
From: "Fabian Lange" <fabian.la...@symfony-project.com>
Date: Thu, 3 Jul 2008 08:19:38 +0200
Local: Thurs, Jul 3 2008 2:19 am
Subject: Changing the way plugins provide web assets

Hi everybody,
yesterday I moved the current Javascript stuff to a plugin, and didn't
notice an error that comes up on my new machine: The Javascript assets are
missing. I didn't notice it yesterday, because my /sf alias in the htaccess
was still there (but pointing to an 1.0 release :-))
Currently plugins will copy their assets on windows when using the plugin
installation, while un *nix systems it tries a symlink.
But there is no installation for core plugins.
This made me come up with a new idea:
We enhance the clear-cache task in a way, that it deletes the plugins asset
directory in web folder and then recollects all assets from symfony core,
symfony core plugins and optional plugis that are installed and copies them
over.

The pros are that this would work quite easily and help my current issue,
It would avoid some of the trac tickets that delt with plugin assets in
windows,
it would also help updating plugins that you get via svn (where the assets
are a manual step at the moment)

The cons are limited, at the moment I can see only backwards compatibility
issues with regard to how the actual path to the JS/CSS is used in the
plugins, but I guess with some deeper investigations this can be solved.
A slightly less BC problematic solution would be to do that only for core
plugins. The advantage of that wold be that the path is known (its the sf
prefixed one) , but it looks a bit inconsistent for me.

As Jonathan is currently working on the deploy task, we could try to think
about implications of the old and the new behaviour for deploying. Afaik the
symlink recreation on deployment was also an issue in the past.

Hope you have some good inputs.

@Fabien, any other idea how to solve the data directory issue for core
plugins?

.: Fabian


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien Potencier  
View profile  
 More options Jul 3 2008, 2:44 am
From: Fabien Potencier <fabien.potenc...@symfony-project.com>
Date: Thu, 03 Jul 2008 08:44:26 +0200
Local: Thurs, Jul 3 2008 2:44 am
Subject: Re: [symfony-devs] Changing the way plugins provide web assets
I think it's a good idea to create a task for that, but I'm not sure we
want to do it in the cache:clear task. It has nothing to do with
clearind the cache and on windows, it will add a large overhead if you
have a lot of plugins with a lot of assets to be copied to the web/
directory.

What about creating a new task?

Fabien

--
Fabien Potencier
Sensio CEO - symfony lead developer
sensiolabs.com | symfony-project.com | aide-de-camp.org
Tél: +33 1 40 99 80 80


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabian Lange  
View profile  
 More options Jul 3 2008, 2:48 am
From: "Fabian Lange" <fabian.la...@symfony-project.com>
Date: Thu, 3 Jul 2008 08:48:19 +0200
Local: Thurs, Jul 3 2008 2:48 am
Subject: Re: [symfony-devs] Re: Changing the way plugins provide web assets

I am fine with a new task, but I just thought that the semantics are
similar.
The cache, although not built autmatically for web assets is in the web
directory, while the "uncached" version is in the plugin directory.

something like "reload assets"?
.: Fabian

On Thu, Jul 3, 2008 at 8:44 AM, Fabien Potencier <


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
markus.staab  
View profile  
 More options Jul 3 2008, 6:07 am
From: "markus.staab" <markus.st...@redaxo.de>
Date: Thu, 3 Jul 2008 03:07:11 -0700 (PDT)
Local: Thurs, Jul 3 2008 6:07 am
Subject: Re: Changing the way plugins provide web assets
i also think a new task would be the better way...

because if people edit the assets in their webfolder and start the
clear-cache task all the custom code would be overriden by the default
assets

On 3 Jul., 08:48, "Fabian Lange" <fabian.la...@symfony-project.com>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabian Lange  
View profile  
 More options Jul 4 2008, 3:37 pm
From: "Fabian Lange" <fabian.la...@symfony-project.com>
Date: Fri, 4 Jul 2008 21:37:35 +0200
Local: Fri, Jul 4 2008 3:37 pm
Subject: Re: [symfony-devs] Re: Changing the way plugins provide web assets

Okay, valid point.
If I would make such a task, could we integrate it into the plugin
installation procedure?
Would we need two versions of this Task then? One that installs all, and on
that installs only for the given plugin?

Does anyone see a problem replacing the current plugin web asset procedure
with this?
.: Fabian

On Thu, Jul 3, 2008 at 12:07 PM, markus.staab <markus.st...@redaxo.de>
wrote:


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabien Potencier  
View profile  
 More options Jul 5 2008, 5:11 pm
From: Fabien Potencier <fabien.potenc...@symfony-project.com>
Date: Sat, 05 Jul 2008 23:11:27 +0200
Local: Sat, Jul 5 2008 5:11 pm
Subject: Re: [symfony-devs] Re: Changing the way plugins provide web assets

Fabian Lange wrote:
> Okay, valid point.
> If I would make such a task, could we integrate it into the plugin
> installation procedure?
> Would we need two versions of this Task then? One that installs all, and
> on that installs only for the given plugin?

You only need one task with one optional argument.

If you provide an argument, this is the plugin for which you want to
install/fix web assets.

With no argument, you want to install/fix web assets for all plugins.

> Does anyone see a problem replacing the current plugin web asset
> procedure with this?

You don't really replace the current procedure. You refactor the
existing code by extracting the web asset part to make a new task and
call it from the old code.

Fabien


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Fabian Lange  
View profile  
 More options Aug 20 2008, 2:57 pm
From: "Fabian Lange" <fabian.la...@symfony-project.com>
Date: Wed, 20 Aug 2008 20:57:01 +0200
Local: Wed, Aug 20 2008 2:57 pm
Subject: Re: [symfony-devs] Re: Changing the way plugins provide web assets

Hi,
I just worked on this issue and think I have a good solution:

You don't really replace the current procedure. You refactor the

> existing code by extracting the web asset part to make a new task and
> call it from the old code.

I chose an even better way (at least I think its better :-)). I left the
current code intact and just added a new plugin-task:
plugin:configure-core
The only purpose of this task is to iterate over the core plugins and send
the plugin.post_install event.
I introduced a "sourceDirectory" parameter for this event so that the
PluginManager can now use a different directory rather than the current
plugin installation directory if requested.

It works fine for the use cases I had in mind and is a very lightweigth
solution.
And it is extensible as well. If we need some more "plugin general" post
installation steps, we can just add them in
sfSymfonyPluginManager.class#ListenToPluginPostInstall()

I have not started calling this task from the create project/upgrade tasks,
because I first want to let you review this task and check if it is a good
idea to do so.

If required we could refactor it to a general "rerun post install for all
plugins" invoker task.

Regards
.: Fabian

PS: http://trac.symfony-project.org/changeset/11005


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google