Skip to content
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

Add support for multiple [[lib]]s in a package. #79

Closed
wants to merge 1 commit into from

Conversation

huonw
Copy link
Member

@huonw huonw commented Jun 27, 2014

This is totally the naivest method possible for allowing multiple [[lib]]s (change &libs[0] to a loop over libs) and so is likely incorrect. Feel free to reject.

@wycats
Copy link
Contributor

wycats commented Jun 27, 2014

I'd rather support multi-package repos than multi-lib packages.

@huonw
Copy link
Member Author

huonw commented Jun 27, 2014

Discussed on IRC.

@huonw huonw closed this Jun 27, 2014
@huonw huonw deleted the multiple-libs branch June 27, 2014 23:36
@steveklabnik
Copy link
Member

Maybe link to the log while it's handy, for posterity?

@huonw
Copy link
Member Author

huonw commented Jun 27, 2014

I don't think #cargo has logging yet; here's the transcript:

[09:28:13] <huon> wycats: acrichto: r? https://github.com/rust-lang/cargo/pull/79
[09:28:29] <wycats> I'm not actually in favor of this :P
[09:28:37] <wycats> I think we should support multi-package repos
[09:28:42] <wycats> not multi-lib packages
[09:28:51] <wycats> huon: ^
[09:29:04] <o11c> wycats: but syntax extensions
[09:29:13] <wycats> o11c: put them in a separate package in the same repo
[09:29:21] <huon> wycats: yeah, I assumed that there'd be something like that
[09:29:29] <wycats> huon: I want [meta-package]
[09:29:30] <o11c> multi-lib package conceptually sounds better for that case
[09:29:33] <huon> since the implementation was so simple
[09:29:47] <wycats> which just lists out the package roots contained in the repo
[09:29:52] <wycats> and then the PathSource can use that
[09:29:59] <wycats> (GitSource uses PathSource)
[09:30:09] <wycats> to return a list of packages rather than one
[09:30:16] <huon> as background: why are binaries different to libs in this case?
[09:30:26] <wycats> because you extern libs
[09:30:29] <wycats> but not bins
[09:31:04] <wycats> if I have a package foo
[09:31:10] <wycats> I can easily map extern crate foo if there's one lib
[09:31:15] <wycats> if there are two libs, which one do I pull in?
[09:31:22] <wycats> (there are several issues along those lines)
[09:31:31] <wycats> (I think it's cleaner for packages to represent a single crate)
[09:31:35] <wycats> (so the names are ==)
[09:31:55] <o11c> hm, does cargo have a way to do handle demos?
[09:32:19] <huon> wycats: ah, then why does [[lib]] have a name field?
[09:32:31] <wycats> huon: in theory it should not
[09:32:35] <wycats> but [[lib]] // no contents
[09:32:37] <wycats> seems O_O
[09:32:40] <huon> haha
[09:32:45] <wycats> all of this can be addressed once the metadata RFC lands
[09:32:48] <wycats> which will allow src/lib.rs
[09:32:52] <wycats> and just inferring the info
[09:32:52] <huon> ok, cool.

@wycats
Copy link
Contributor

wycats commented Jun 27, 2014

Can we get logging? Who do we have to ask?

@steveklabnik
Copy link
Member

23:47 < huon> does #cargo have logging?
23:48 -!- Rym [y@3198499C.452D6F23.8772DA20.IP] has quit [Ping timeout]
23:49 < steveklabnik> huon: <3. https://botbot.me/mozilla/cargo/
23:49 < steveklabnik> apparently not?
23:49 -!- Rym [y@3198499C.452D6F23.8772DA20.IP] has joined #cargo
23:49 < steveklabnik> but yeah, i've had 'discussed on campfire' come back and bite 
                      me
23:49 < steveklabnik> heh
23:49 < huon> yay for copy-paste :)
23:50 < steveklabnik> https://botbot.me/request/
23:50 < steveklabnik> looks like
23:50 < steveklabnik> who has op?

😉 ❤️

@wycats
Copy link
Contributor

wycats commented Jun 28, 2014

can haz log? 👍

bors added a commit that referenced this pull request May 20, 2019
…crichton

Update im-rc requirement from 12.1.0 to 13.0.0

Updates the requirements on [im-rc](https://github.com/bodil/im-rs) to permit the latest version.
<details>
<summary>Release notes</summary>

*Sourced from [im-rc's releases](https://github.com/bodil/im-rs/releases).*

> ## 13.0.0
> The minimum supported Rust version is now 1.34.0.
>
> ### Changed
>
> - `im::iter::unfold` now gives you the owned state value rather than an immutable reference to it, which makes it a little more useful.
>
> ### Removed
>
> - The deprecated `singleton` constructors have been removed. Please use `unit` instead.
> - The deprecated methods `Vector::chunks` and `Vector::chunks_mut` have been removed in favour of `Vector::leaves` and `Vector::leaves_mut` respectively. ([#50](https://github-redirect.dependabot.com/bodil/im-rs/issues/50))
> - The deprecated reference to [`sized-chunks`](https://crates.io/crates/sized-chunks) has been removed. If you need it, please use the `sized-chunks` crate directly.
> - `im::iter::unfold_mut` has been removed, as there's no meaningful difference between it and rust-std 1.34.0's `std::iter::from_fn` with a captured state variable.
>
> ### Fixed
>
> - `Vector` now uses [`sized_chunks::InlineArray`](https://docs.rs/sized-chunks/0.3.0/sized_chunks/inline_array/struct.InlineArray.html) instead of an `Empty` enum case to avoid allocation at very small sizes, letting you store a handful of elements on the stack before needing to grow into a full chunk. This has a beneficial effect on performance as well, as there's no pointer into the heap to dereference, making it faster than `std::vec::Vec` in this configuration.
> - Some complexity timings have been added and corrected. ([#87](https://github-redirect.dependabot.com/bodil/im-rs/issues/87))
> - `OrdSet::is_subset(&self, other)` now returns immediately when `self` is larger than `other` and thus could not possibly be a subset of it. ([#87](https://github-redirect.dependabot.com/bodil/im-rs/issues/87))
</details>
<details>
<summary>Changelog</summary>

*Sourced from [im-rc's changelog](https://github.com/bodil/im-rs/blob/master/CHANGELOG.md).*

> ## [13.0.0] - 2019-05-18
>
> The minimum supported Rust version is now 1.34.0.
>
> ### Changed
>
> - `im::iter::unfold` now gives you the owned state value rather than an
>   immutable reference to it, which makes it a little more useful.
>
> ### Removed
>
> - The deprecated `singleton` constructors have been removed. Please use `unit`
>   instead.
> - The deprecated methods `Vector::chunks` and `Vector::chunks_mut` have been
>   removed in favour of `Vector::leaves` and `Vector::leaves_mut` respectively.
>   ([#50](https://github-redirect.dependabot.com/bodil/im-rs/issues/50))
> - The deprecated reference to [`sized-chunks`](https://crates.io/crates/sized-chunks)
>   has been removed. If you need it, please use the `sized-chunks` crate directly.
> - `im::iter::unfold_mut` has been removed, as there's no meaningful difference
>   between it and rust-std 1.34.0's `std::iter::from_fn` with a captured state
>   variable.
>
> ### Fixed
>
> - `Vector` now uses
>   [`sized_chunks::InlineArray`](https://docs.rs/sized-chunks/0.3.0/sized_chunks/inline_array/struct.InlineArray.html)
>   instead of an `Empty` enum case to avoid allocation at very small sizes,
>   letting you store a handful of elements on the stack before needing to grow
>   into a full chunk. This has a beneficial effect on performance as well, as
>   there's no pointer into the heap to dereference, making it faster than
>   `std::vec::Vec` in this configuration.
> - Some complexity timings have been added and corrected. ([#87](https://github-redirect.dependabot.com/bodil/im-rs/issues/87))
> - `OrdSet::is_subset(&self, other)` now returns immediately when `self` is
>   larger than `other` and thus could not possibly be a subset of it. ([#87](https://github-redirect.dependabot.com/bodil/im-rs/issues/87))
>
> ## [12.3.4] - 2019-04-08
>
> ### Changed
>
> - `Clone` constraints have been further relaxed on maps and sets, so that you
>   can now lookup and iterate over them without requiring a `Clone` constraint
>   (though you do still need `Clone` to actually insert data into them to lookup
>   or iterate over). ([#81](https://github-redirect.dependabot.com/bodil/im-rs/issues/81))
>
> ### Fixed
>
> - Enforces the latest bugfix release of sized-chunks. ([#78](https://github-redirect.dependabot.com/bodil/im-rs/issues/78))
> - Another edge case bugfix to `Vector`'s size table handling. ([#79](https://github-redirect.dependabot.com/bodil/im-rs/issues/79))
>
> ## [12.3.3] - 2019-03-11
></tr></table> ... (truncated)
</details>
<details>
<summary>Commits</summary>

- [`1e59b66`](bodil/im-rs@1e59b66) (cargo-release) version 13.0.0
- [`6ddf406`](bodil/im-rs@6ddf406) Broken link fix.
- [`60de96d`](bodil/im-rs@60de96d) Replace `Vector::Empty` with `Vector::Inline` using `InlineArray`.
- [`b7578f8`](bodil/im-rs@b7578f8) Fix Vector benchmark from_fn issues.
- [`d2befa1`](bodil/im-rs@d2befa1) Merge pull request [#89](https://github-redirect.dependabot.com/bodil/im-rs/issues/89) from AljoschaMeyer/master
- [`f519c66`](bodil/im-rs@f519c66) Adjust doc tests
- [`37f8046`](bodil/im-rs@37f8046) Add relative_complement to sets/maps
- [`01f2726`](bodil/im-rs@01f2726) Add symmetrical_difference to sets/maps
- [`c0a8fc6`](bodil/im-rs@c0a8fc6) Add timings to more `OrdSet` ops, and an early return optimisation to `is_sub...
- [`7c5f501`](bodil/im-rs@7c5f501) Merge pull request [#84](https://github-redirect.dependabot.com/bodil/im-rs/issues/84) from bodil/dependabot/cargo/sized-chunks-0.2.0
- Additional commits viewable in [compare view](bodil/im-rs@12.1.0...13.0.0)
</details>
<br />

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot ignore this [patch|minor|major] version` will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
- `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com):
- Update frequency (including time of day and day of week)
- Automerge options (never/patch/minor, and dev/runtime dependencies)
- Pull request limits (per update run and/or open at any time)
- Out-of-range updates (receive only lockfile updates, if desired)
- Security updates (receive only security updates, if desired)

Finally, you can contact us by mentioning @dependabot.

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants