简体   繁体   English

我可以要求在Metacello配置中特定提交另一个Metacello ConfigurationOf吗?

[英]Can i require a specific commit of another Metacello ConfigurationOf in my Metacello configuration?

In the baseline of ConfigurationOfMyProject i require project Something : ConfigurationOfMyProject的基线中,我需要项目Something

spec project: 'Something' with: [
   spec
      className: 'ConfigurationOfSomething';
      repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
      versionString: '1.0' ].

The maintainer of ConfigurationOfSomething committed a new version of ConfigurationOfSomething that contains a bug. ConfigurationOfSomething的维护者提交了一个包含错误的ConfigurationOfSomething新版本。 So my ConfigurationOfMyProject does not load anymore. 因此,我的ConfigurationOfMyProject不再加载。

Can i require a specific version of ConfigurationOfSomething like: 我可以要求ConfigurationOfSomething的特定版本,例如:

spec project: 'Something' with: [
   spec
      className: 'ConfigurationOfSomething';
      repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
      monticelloVersion: 'ConfigurationOfSomething-SomeOne.125'
      versionString: '1.0' ].

Yes, you can use the #file: message to force loading a specific version. 是的,您可以使用#file:消息来强制加载特定版本。

spec project: 'Something' with: [
   spec
      className: 'ConfigurationOfSomething';
      file: 'ConfigurationOfSomething-SomeOne.125'; 
      repository: 'http://smalltalkhub.com/mc/SomeOne/Something/main';
      versionString: '1.0' ].

See the Metacello API for an overview. 有关概述,请参见Metacello API

You could, but probably don't want to. 您可以,但可能不想。 The consequence of doing what you suggested above, is that you are creating a snapshot that can no longer be patched. 执行上面建议的结果是,您正在创建无法再打补丁的快照。 [Snapshot versions should not be in a configuration. [快照版本不应处于配置中。 They are a separate concept, needing their own class]. 它们是一个独立的概念,需要自己的类]。 With about the same amount of effort, you can take a look at the changes that were made in version 126, and make sure you get those. 通过大约相同的工作量,您可以查看版本126中所做的更改,并确保获得了这些更改。

If you open the repository with the monticello browser, you select version 126 and then history. 如果使用monticello浏览器打开存储库,请选择版本126,然后选择历史记录。 Select version 125 in the history, and view changes in the context menu. 在历史记录中选择版本125,然后在上下文菜单中查看更改。 There you see that default was changed (and a new baseline was added). 在那里,您看到默认值已更改(并添加了新的基准)。 If you now make default (or stable) dependent on your needs, you can save a new version of the configuration. 如果现在根据需要设置默认值(或稳定值),则可以保存新版本的配置。 Just make sure you make the change in the latest version. 只要确保您在最新版本中进行更改即可。

spec for: #'common' version: '2.1'.
spec for: #'pharo1.3.x' version: '2.2'.
spec for: #'pharo1.4.x' version: '2.4'.
spec for: #'pharo2.x' version: '2.5'.
spec for: #'pharo3.x' version: '2.6-snapshot'.

[edit] If the issue is closed with WontFix, that often means not enough time to do all the work to fix it. [edit]如果该问题已通过WontFix解决,则通常意味着没有足够的时间来完成修复工作。 You can get better results by showing that the fix works for your needs, and preferably also the latest image using this code. 通过显示该修补程序可以满足您的需求,并且最好使用此代码显示最新图像,您可以获得更好的结果。 So just make this change in a local package (in a clean image) and try it. 因此,只需在本地包中进行此更改(以清晰的图像形式),然后尝试一下即可。 If you can report that it works, I'll make the change :) 如果您可以报告它有效,我将进行更改:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM