Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-11-01 Thread Slava Pestov via swift-dev
The problem is if a private type or function X is referenced from a function Y with a serialized body, then if Y is inlined inside of another module, it cannot see the symbol for X. The solution is to disable -sil-seiralize-all and replace it with an explicit ‘fragile’ attribute that is put on c

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-11-01 Thread Dave Abrahams via swift-dev
on Tue Nov 01 2016, Alexis wrote: > Hmm, I excitedly prototyped out refactoring HashedCollections to > properly use privacy and decent naming since I’m clobbering the whole > file with the new indexing stuff anyway. Unfortunately I hit a linker > error. I can’t seem to produce a reduced test cas

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-11-01 Thread Alexis via swift-dev
Hmm, I excitedly prototyped out refactoring HashedCollections to properly use privacy and decent naming since I’m clobbering the whole file with the new indexing stuff anyway. Unfortunately I hit a linker error. I can’t seem to produce a reduced test case. Making similar but smaller changes to o

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-11-01 Thread Alexis via swift-dev
I made a PR with some basic privacy usage for Array, and everything seems to be working on OSX, but not Linux. https://github.com/apple/swift/pull/5573 Exit Code: 1 Command Output (stderr): -- /usr/bin/ld.gold: error: /home/buildnode/jenkins/workspa

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-29 Thread Dave Abrahams via swift-dev
on Sat Oct 29 2016, Alexis wrote: >> On Oct 29, 2016, at 12:13 AM, Slava Pestov wrote: >> >> It will become the default, but not yet, so yeah, you shouldn’t merge >> anything that only builds > with this flag set. >> >> Can you share the patch that adds private modifiers along with the >> li

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-29 Thread Alexis via swift-dev
> On Oct 29, 2016, at 12:13 AM, Slava Pestov wrote: > > It will become the default, but not yet, so yeah, you shouldn’t merge > anything that only builds with this flag set. > > Can you share the patch that adds private modifiers along with the linker > errors you are seeing? Now would be a g

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Slava Pestov via swift-dev
It will become the default, but not yet, so yeah, you shouldn’t merge anything that only builds with this flag set. Can you share the patch that adds private modifiers along with the linker errors you are seeing? Now would be a good time to sort out these issues. > On Oct 28, 2016, at 4:16 PM,

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Erik Eckstein via swift-dev
> On Oct 28, 2016, at 5:01 PM, Jordan Rose wrote: > > >> On Oct 28, 2016, at 17:00, Erik Eckstein > > wrote: >> >>> >>> On Oct 27, 2016, at 1:44 PM, Jordan Rose via swift-dev >> > wrote: >>> >>> On Oct 23, 2016, at 16:13, Michael

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Jordan Rose via swift-dev
> On Oct 28, 2016, at 17:00, Erik Eckstein wrote: > >> >> On Oct 27, 2016, at 1:44 PM, Jordan Rose via swift-dev > > wrote: >> >> >>> On Oct 23, 2016, at 16:13, Michael Gottesman >> > wrote: >>> >>> On Oct 23, 2016, at 3:30 PM, A

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Erik Eckstein via swift-dev
> On Oct 27, 2016, at 1:44 PM, Jordan Rose via swift-dev > wrote: > > >> On Oct 23, 2016, at 16:13, Michael Gottesman > > wrote: >> >> >>> On Oct 23, 2016, at 3:30 PM, Alexis Beingessner via swift-dev >>> mailto:swift-dev@swift.org>> wrote: >>> >>> Dave pointed

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Alexis Beingessner via swift-dev
Won't merging anything relying on this flag break the build? Is this going to become the "new" default soon? > On Oct 28, 2016, at 6:43 PM, Slava Pestov wrote: > > >>> On Oct 23, 2016, at 4:13 PM, Michael Gottesman via swift-dev >>> wrote: >>> >>> >>> On Oct 23, 2016, at 3:30 PM, Alexis Be

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Slava Pestov via swift-dev
> On Oct 23, 2016, at 4:13 PM, Michael Gottesman via swift-dev > wrote: > > >> On Oct 23, 2016, at 3:30 PM, Alexis Beingessner via swift-dev >> wrote: >> >> Dave pointed out to me this week that the build crashes if the stdlib tries >> to use private/fileprivate. I tried it myself and lo a

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-28 Thread Jordan Rose via swift-dev
> On Oct 23, 2016, at 16:13, Michael Gottesman wrote: > > >> On Oct 23, 2016, at 3:30 PM, Alexis Beingessner via swift-dev >> wrote: >> >> Dave pointed out to me this week that the build crashes if the stdlib tries >> to use private/fileprivate. I tried it myself and lo and behold the linke

Re: [swift-dev] Inability to leverage privacy in the stdlib

2016-10-23 Thread Michael Gottesman via swift-dev
> On Oct 23, 2016, at 3:30 PM, Alexis Beingessner via swift-dev > wrote: > > Dave pointed out to me this week that the build crashes if the stdlib tries > to use private/fileprivate. I tried it myself and lo and behold the linker > can't find the private symbols. He couldn't recall what about