Skip to content

Conversation

@mbland
Copy link
Owner

@mbland mbland commented Feb 10, 2017

Part of #150. This is the first step towards updating the output to match _GO_USE_MODULES behavior.

The first two commits are pure refactorings, using functions introduced in #120, updating the usage of @go.pad_items and @go.zip_items, and extracting a helper function for ./go modules --imported.

The third commit fixes a latent bug in @go.split from the strings module wherein items that contained newlines would not split correctly, as the input string would get truncated at the first newline.

I discovered this @go.split bug while writing the fourth commit to add _GO_IMPORTED_MODULE_CALLERS info to ./go modules --imported, which I included as a matter of convenience after extracting the helper function in the second commit.

The fifth commit is the actual first step towards #150, whereby the project's local modules are listed before plugin modules. The next step will be to produce separate sections for internal (_GO_SCRIPTS_DIR/lib) and public (_GO_ROOTDIR/lib) project modules.

Preliminary refactoring to use functions introduced as part of #120
before making more substantial changes towards to #150. Note that
`_@go.find_module` replaces `_@go.module_path`.
Another preliminary refactoring before making more substantial changes
towards #150. Updates calls to `@go.pad_items` and `@go.zip_items`,
eliminates `IFS=$'\n'` splitting and `echo` in favor of `printf '%s\n'`,
and extracts a helper function to handle the `--imported` flag by using
`_GO_IMPORTED_MODULES` and `_GO_IMPORTED_MODULE_FILES` directly.

This latter change opens the possibility of adding
`_GO_IMPORTED_MODULE_CALLERS` information to the output as well.
Part of #150. This is the first step towards updating the output
to match _GO_USE_MODULES behavior. The next step will be to produce
separate sections for internal and public project modules.
@mbland mbland added this to the v1.4.0 milestone Feb 10, 2017
@mbland mbland self-assigned this Feb 10, 2017
@coveralls
Copy link

Coverage Status

Coverage increased (+0.04%) to 95.262% when pulling c8f6a4c on modules-1-of-2 into 6fd0eab on master.

@mbland mbland merged commit f8a8970 into master Feb 10, 2017
@mbland mbland deleted the modules-1-of-2 branch February 10, 2017 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants