summaryrefslogtreecommitdiff
path: root/src/rebar_prv_edoc.erl
Commit message (Collapse)AuthorAgeFilesLines
* Fixing duplicate macro definition in umbrella edocFred Hebert2019-07-301-1/+25
| | | | | | | | | | | | | | | | | When in umbrella mode (or through multiple profiles), users can specify macros for EDocs based on either the {def, ...} or the {macros, ...} arguments. This patch replaces the prior options merging for umbrellas to use the rebar3 tup_umerge utils to remove identical duplicates while preserving correct ordering, and manually merges the {macros, ...} definitions while ke eping the correct precedence rules since these appear (given their behaviour) to be all individually extracted and passed as `{d, ...}` to the compiler so that epp expands them. This compiler function freaks out on any re-defined macros and explodes. Do note that the macros with `{def, ...}` are edoc macros and do not suffer from that issue, safely deduplicating multiple definitions.
* Ensure EDoc opts in umbrella apps are respectedFred Hebert2019-07-041-1/+4
| | | | | | | | | | | | | This adds an additional loading and merging of options for EDoc using the values from the top-level along with those specified in the rebar.config of an umbrella application. The app-specific config values are prepended to the global ones; this can likely cause some problems with manual path handling, but is unlikely to happen in practice and the rest seems to work fine based on order Fixes the issue in #2114
* Abstracted path managementFred Hebert2018-10-111-2/+2
| | | | | | | | | | | | | | | | Move path management out of rebar_utils manual code path function handling (which we leave there for backwards compat), and centralize them to allow easier coordination of paths between plugins and deps. On top of path handling, do a check of loaded modules to only purge and reload those that actually need it done in order to prevent all kinds of weird interaction and accidental purge kills. It also allows the possible cohabitation of both at once, with a "in case of conflict pick X" as a policy Changing path handling in providers also highlighted a bunch of bugs in some tests and appears to fix some in other providers, specifically around plugins.
* Unicode support in all the placesFred Hebert2017-08-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* [#149002995] fix flipped variablesSam Sawan2017-07-171-5/+6
|
* [#149002995] stop eating edoc path configSam Sawan2017-07-171-6/+5
| | | | | | be a little smarter when generating edocs; loof for some sort of doc path and then replace w/e was there with the updated doc paths
* Survive EDoc crashesFred Hebert2017-01-271-9/+27
| | | | | | | | | | | Instead of a hard crash, display an error message indicating which app failed. We can't report the exact failure; only EDoc does it to stdout itself and we can't capture it. Pre/Post hooks are run properly despite the failure, as per escript and compile providers.
* Make Edoc carry paths of pre-built librariesFred Hebert2016-08-251-9/+26
| | | | | | | | | | | Given the topological sort applied to top-level apps, we should be able to carry the edoc values for paths configured when more than one app exists. This allows multiple disjoint app to have defined cross-linking in the documentation. Tests pending.
* Add a provider hook for edocNathaniel Waisbrot2016-04-131-1/+7
| | | | Allows `pre_hooks` and `post_hooks` to fire for the `edoc` provider.
* run edoc provider in docs providerTristan Sloughter2015-07-211-1/+2
|
* fix bareness issuesFred Hebert2015-05-311-1/+1
| | | | | | - Crashes in providers lib when no providers in a namespace are bare - Making sure bareness matches semantics; i.e. a bare provider is visible, a non-bare provider is hidden.
* be able to use the specified edoclet in depssoranoba2015-05-161-1/+3
|
* Provide descriptions for all tasksFred Hebert2015-04-041-1/+1
|
* update all examples in providers to use rebar3Tristan Sloughter2015-03-071-1/+1
|
* add edoc providerTristan Sloughter2015-02-251-0/+48