freshli-lib icon indicating copy to clipboard operation
freshli-lib copied to clipboard

Add support for Gemfile.lock files using YAML format

Open mscottford opened this issue 5 years ago • 2 comments

Exception from Jupyter Notebook:

System.ArgumentNullException: Value cannot be null. (Parameter 'source')
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
   at Freshli.Languages.Ruby.RubyGemsRepository.LatestAsOf(DateTime date, String name)
   at Freshli.LibYearCalculator.ComputeAsOf(DateTime date)
   at Freshli.Runner.Run(String analysisPath, DateTime asOf)
   at Freshli.Runner.Run(String analysisPath)
   at Submission#45.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken)
   at System.Linq.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   at System.Linq.Enumerable.Where[TSource](IEnumerable`1 source, Func`2 predicate)
   at Freshli.Languages.Ruby.RubyGemsRepository.LatestAsOf(DateTime date, String name)
   at Freshli.LibYearCalculator.ComputeAsOf(DateTime date)
   at Freshli.Runner.Run(String analysisPath, DateTime asOf)
   at Freshli.Runner.Run(String analysisPath)
   at Submission#45.<<Initialize>>d__0.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Microsoft.CodeAnalysis.Scripting.ScriptExecutionState.RunSubmissionsAsync[TResult](ImmutableArray`1 precedingExecutors, Func`2 currentExecutor, StrongBox`1 exceptionHolderOpt, Func`2 catchExceptionOpt, CancellationToken cancellationToken

mscottford avatar Jun 17 '20 02:06 mscottford

The exception above has been addressed. Running against the latest code, the following error occurs:

Exception executing Freshli for args = [https://github.com/diaspora/diaspora]: Unrecognized format for Gemfile.lock. Unrecognized format for Gemfile.lock.

This is because the initial commit of Gemfile.lock doesn't contain GEM.

Error handling should to be improved such that it simply ignores a manifest file commit that doesn't match the expected format.

nickiemc avatar Oct 02 '20 02:10 nickiemc

It's probably best to make the parser robust enough to handle the yaml version of the file format. I doubt that's the only project that we're going to encounter with that problem.

mscottford avatar Oct 05 '20 15:10 mscottford