Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

An infinite loop was corrected. #6

Open
wants to merge 56 commits into
from

Conversation

Projects
None yet
7 participants

When TestA and TestB need each other, an infinite loop is generated.
The verification prepared and confirmed following test files TestA and TestB.

Source header of TestA.js

#JS
/*

---
name: TestA

description: Test file A for operation verification

license: MIT-style

authors:
- Noritaka Horio

requires: [Core/Core, TestB]

provides: [TestA]
...
*/

Source header of TestB.js

#JS
/*

---
name: TestB

description: Test file B for operation verification

license: MIT-style

authors:
- Noritaka Horio

requires: [Core/Core, TestA]

provides: TestB
...
*/

To solve an infinite loop, it was corrected that the file processed once was not processed.

ibolmo and others added some commits Oct 15, 2010

Can pass in components to exclude from the build (like Depender) for …
…dynamic loading of scripts. Supported methods:

- build_from_components
- write_from_components
An infinite loop in the solution part of the dependence is generated.
What processed once excluded it.

Signed-off-by: holy <holy.shared.design@gmail.com>
Owner

kamicane commented Oct 29, 2010

cool stuff, I'll test and pull asap.

Contributor

subtleGradient commented Oct 30, 2010

Nice!

slik and others added some commits Nov 29, 2010

The change of https://github.com/slik/packager.git is merged.
Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
The distinction from isset() to empty() because the error competes at…
… the build

Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
Because the output message cannot be read by other programs, the meth…
…od of outputting the message is appropriately changed.

php://stderr to php://stdout
It is corrected that an extra output is included.
Signed-off-by: Noritaka Horio <holy.shared.design@gmail.com>
An interim commit. Quick pass and doesn't seem that anything else (wi…
…thout breaking the interface) needs to be refactored. Going to start testing for correctness next.
Moved Package to its own file. At the moment it's in root directory, …
…but could be changed in the future. I also organized, in alphabetical order packager.php. /me gets the shield ready.
Moved Source specific code into a new Source class. Required if I'm g…
…oing to add a source dynamically into a package.
Some more work done on the Source. Now working on the graph on the Pa…
…ckager. As on now, Package is just a nice container of sources. Sources are a container of requires and provides, and each requires and provides is added to Packager so that it builds the graph. Next, I need to create and populate the graph, search and find components, iterate the graph for dependencies, and build a chain.
Added the add_component method.
The graph structure is just two arrays. First for sources, and the other
for source index keys. The keys are generated by generators that can be
programmatically be added. See #configure method. Tip: override
configure and add your own generators above or below the
parent::configure call.

Still missing the add_dependency and build methods.
Added Packager.strip_blocks. Decided that it's not the build function
that should be doing the processing of the output. Perhaps build should
return a 'Build' class that has a lot of utility functions like
strip_blocks.
A couple of key changes. get_required_for_source now returns in required
order (Core, for example, would be first). This is now the case, since I
needed to recursively look for the most required component.

I've also added the ability to pass Source instances to required method
in Source.
Added support to remove packages, sources, and components. Did a bit …
…of refactoring for more DRY. This also includes a shift from throwing an Exception if the source is not found in the build process. This would allow for -packages or +use-only in cli (that's next).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment