[
http://dev.sourcefabric.org/browse/LS-600?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Romain Beauxis resolved LS-600.
-------------------------------
Resolution: Fixed
Fixed in c4b973e71263. Also added a regression test.
> list.remove_assoc doesn't work as expected.
> -------------------------------------------
>
> Key: LS-600
> URL: http://dev.sourcefabric.org/browse/LS-600
> Project: Liquidsoap
> Issue Type: Bug
> Components: Liquidsoap
> Affects Versions: 1.0
> Reporter: MartinS4
> Priority: Major
>
> Original code that led to the bug:
> dyn_sources :=
> list.append( [(uri,{ source.shutdown(s0) ; source.shutdown(output) ;
> print("removing for source id:") ; print(source.id(output)) ;
> print(sources_metadata_paths) ; sources_metadata_paths :=
> list.remove_assoc(source.id(output), !sources_metadata_paths) ;
> print(sources_metadata_paths) ; delay := (-1.) })],
> !dyn_sources )
> Execution output:
> removing for source id:
> 6d7d15f1-e4fb-4f92-b902-d9630470b3f5
> ref([("6d7d15f1-e4fb-4f92-b902-d9630470b3f5","http://martin-virtualbox/titles")])
> ref([("6d7d15f1-e4fb-4f92-b902-d9630470b3f5","http://martin-virtualbox/titles")])
>
> And below David's answer that confirm/explain the bug:
> OK, this is a bug. I could reproduce by using the primitive
> list.remove(2,[2]) == [2]... Sorry about that. Please file a bug
> report. My guess is that it relies on physical equality rather than
> structural one.
> In the meantime, here's a better implementation (straightforward, but
> there might be typos...):
> list.remove_assoc =
> fun(x,l) -> list.fold_left(fun(l,y)->if fst(y)==x then l else
> list.append([y],l) end,[],l)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://dev.sourcefabric.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Savonet-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/savonet-devl