New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CE-868 Add support for modules shared from dev.wikia.com #4550

Merged
merged 6 commits into from Jun 23, 2015

Conversation

Projects
None yet
3 participants
@adamkarminski
Contributor

adamkarminski commented Aug 25, 2014

The solution bases on a "Dev:" prefix which works in require("Dev:ExampleModule"). The prefix is also used as a key for modules array that Lua loaders use. This prevents a name conflict since local modules are always in the NS_MODULE namespace and have "Module:" prefix.

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

What happens if this title matches the title for a local module that is loaded on the same page?

Member

Grunny commented on extensions/Scribunto/common/Base.php in cf05ed8 Aug 18, 2014

What happens if this title matches the title for a local module that is loaded on the same page?

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

The prefix should probably be in a constant, also you don't need regex, so just use strpos.

The prefix should probably be in a constant, also you don't need regex, so just use strpos.

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

Likewise here for both putting the prefix in a constant, and not needing regex (just use substr).

Likewise here for both putting the prefix in a constant, and not needing regex (just use substr).

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

The shared module wikia ID shouldn't be a magic number, it should be either a constant or a config var.

The shared module wikia ID shouldn't be a magic number, it should be either a constant or a config var.

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

Weird whitespace ;).

Weird whitespace ;).

@Grunny

This comment has been minimized.

Show comment
Hide comment
@Grunny

Grunny Aug 18, 2014

Member

This needs "Wikia change" comments too.

Member

Grunny commented on 50d3302 Aug 18, 2014

This needs "Wikia change" comments too.

@Grunny Grunny changed the title from Add support for modules shared from dev.wikia.com to CE-868 Add support for modules shared from dev.wikia.com Jan 19, 2015

@wladekb

This comment has been minimized.

Show comment
Hide comment
@wladekb

wladekb May 28, 2015

@Grunny @adamkarminski how about finally merging or closing it?

wladekb commented May 28, 2015

@Grunny @adamkarminski how about finally merging or closing it?

Grunny added a commit that referenced this pull request Jun 23, 2015

Merge pull request #4550 from Wikia/CE-868-shared-lua-modules
CE-868 Add support for modules shared from dev.wikia.com

@Grunny Grunny merged commit edb6cc9 into dev Jun 23, 2015

1 check passed

continuous-integration/travis-ci The Travis CI build passed
Details

@Grunny Grunny deleted the CE-868-shared-lua-modules branch Jun 23, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment