<srm`>
Building collections -> /usr/lib/pony/0.2.1.20160513/packages/collections
<srm`>
was already builded
<srm`>
i didn't know i should add use collections
<Candle>
I have a behaviour that takes an Array[U8] iso; I want to unit test it by passing arrays from String.array() (and other sources of array) How do I go from the 'Array[U8] val' that String.array() returns to the 'Array[U8] iso' ?
<shepheb>
Candle: copy it with clone()
<shepheb>
iso makes guarantees much stronger than val
<shepheb>
or rather, don't use String.array[
<shepheb>
you should be able to recover the string
<shepheb>
if they're string literals, I think "some string".clone() will do it.
aturley has joined #ponylang
<shepheb>
srm`: use declarations are per-file
<shepheb>
every file that mentions collections classes will need to use collections
<srm`>
ok
<shepheb>
transitively being included isn't enough; that's how C++ includes become such a disaster in large projects.
<Candle>
shepheb: (and transitive dependencies in large Maven projects!)
<shepheb>
there's a guy I sat with at breakfast this morning who that's his entire job right now - sorting out Chrome's includes from Cthulhu-tier insanity to decently sane, so that some other big refactorings can proceed safely.
<SeanTAllen>
wow
<SeanTAllen>
not a job i would want
<shepheb>
no, I feel bad for him. the tone of it seems to be "well, it's your turn in the barrel"
<srm`>
ok
<Candle>
Hrm, that sounds like the standard case of "I can be sure that this include is USED; I cannot be sure that the include is UNUSED"
<shepheb>
Candle: I think the main problem here is that the first attempt at the refactoring found that when loads of files were moved around nothing built anymore because transitive dependencies they were requiring but not declaring were gone.
<shepheb>
include-what-you-use is the sane way.
<Candle>
I'd say that was a symptom :p
<Candle>
include-what-you-use is the *only* sane way.
<shepheb>
quite so. but C++ includes make it so easy not to.
<Candle>
"mvn dependency:analyze" is one of the things that is run on our codebases regularly; annoyingly, there are things that are *used* but it can't detect that they are used.
<Candle>
So we can't just say "If it's unused, remove it" some brain power needs to be applied.
<Candle>
Ponylang doesn't have this problem... yet.
<shepheb>
it would be cool to get "unused import" warnings from it.
<Candle>
I have a... rant in my head about package managers; that I need to write up.
<Candle>
(which this 'use X' discussion leads onto)
SilverKey has quit [Quit: Halted.]
copy` has joined #ponylang
SilverKey has joined #ponylang
<jemc>
once I have this pony-ast stuff ironed out, it would be cool to build a pony "linter" that looks for things like unused imports (which could be removed), `var` locals that you never reassign (which could be refactored to `let`), locals that you assign but never use (could be removed), etc
<SeanTAllen>
yes!
<SeanTAllen>
jemc. indeed yes!
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
<shepheb>
Candle: there's been some discussion around package managers.
<shepheb>
that really should be one of the first RFCs, but we'd need a solid plan first and it didn't seem like that was anywhere in sight the last time we had package managers under discussion.
<jemc>
I was planning to do a package manager RFC "soon" - as soon as I iron out the remaining kinks in the basic pony-ast stuff
jemc has quit [Quit: WeeChat 1.4]
Praetonus has quit [Quit: Leaving]
<shepheb>
sounds good to me.
amclain has joined #ponylang
unbalancedparen has joined #ponylang
hibnico has quit [Quit: hibnico]
hibnico has joined #ponylang
runehog has quit [Remote host closed the connection]
hibnico has quit [Quit: hibnico]
hibnico has joined #ponylang
graaff has joined #ponylang
aturley has joined #ponylang
aturley has quit [Ping timeout: 260 seconds]
SilverKey has quit [Quit: Halted.]
SilverKey has joined #ponylang
hibnico has quit [Quit: hibnico]
runehog has joined #ponylang
copy` has quit [Quit: Connection closed for inactivity]